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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | getTokenIndexPlusOneByToken | function getTokenIndexPlusOneByToken(address token) external view returns (uint);
| /**
* @return The index into the array returned from `getFarmTokens`, plus 1. 0 if the token isn't found. If the
* index returned is non-zero, subtract 1 from it to get the real index into the array.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
5910,
5996
]
} | 2,407 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | approve | function approve(address spender, bool isTrusted) external;
| /**
* Approves the spender from `msg.sender` to transfer funds into the contract on the user's behalf. If `isTrusted`
* is marked as false, removes the spender.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
6269,
6333
]
} | 2,408 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | isApproved | function isApproved(address user, address spender) external view returns (bool);
| /**
* True if the `spender` can transfer tokens on the user's behalf to this contract.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
6443,
6528
]
} | 2,409 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | beginFarming | function beginFarming(address user, address funder, address token, uint amount) external;
| /**
* Begins a farm by transferring `amount` of `token` from `user` to this contract and adds it to the balance of
* `user`. `user` must be either 1) msg.sender or 2) a wallet who has approved msg.sender as a proxy; else this
* function reverts. `funder` must fit into the same criteria as `user`; else this functi... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
6888,
6982
]
} | 2,410 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | endFarmingByToken | function endFarmingByToken(address from, address recipient, address token) external returns (uint, uint);
| /**
* Ends a farm by transferring all of `token` deposited by `from` to `recipient`, from this contract, as well as
* all earned DMG for farming `token` to `recipient`. `from` must be either 1) msg.sender or 2) an approved
* proxy; else this function reverts.
*
* @return The amount of `token` withdrawn and t... | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
7430,
7540
]
} | 2,411 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | withdrawAllWhenOutOfSeason | function withdrawAllWhenOutOfSeason(address user, address recipient) external;
| /**
* Withdraws all of `msg.sender`'s tokens from the farm to `recipient`. This function reverts if there is an active
* farm. `user` must be either 1) msg.sender or 2) an approved proxy; else this function reverts.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
7785,
7868
]
} | 2,412 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | withdrawByTokenWhenOutOfSeason | function withdrawByTokenWhenOutOfSeason(
address user,
address recipient,
address token
) external returns (uint);
| /**
* Withdraws all of `user` `token` from the farm to `recipient`. This function reverts if there is an active farm and the token is NOT removed.
* `user` must be either 1) msg.sender or 2) an approved proxy; else this function reverts.
*
* @return The amount of tokens sent to `recipient`
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
8200,
8351
]
} | 2,413 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | getRewardBalanceByOwner | function getRewardBalanceByOwner(address owner) external view returns (uint);
| /**
* @return The amount of DMG that this owner has earned in the active farm. If there are no active season, this
* function returns `0`.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
8529,
8611
]
} | 2,414 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | getRewardBalanceByOwnerAndToken | function getRewardBalanceByOwnerAndToken(address owner, address token) external view returns (uint);
| /**
* @return The amount of DMG that this owner has earned in the active farm for the provided token. If there is no
* active season, this function returns `0`.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
8811,
8916
]
} | 2,415 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | balanceOf | function balanceOf(address owner, address token) external view returns (uint);
| /**
* @return The amount of `token` that this owner has deposited into this contract. The user may withdraw this
* non-zero balance by invoking `endFarming` or `endFarmingByToken` if there is an active farm. If there is
* NO active farm, the user may withdraw his/her funds by invoking
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
9256,
9339
]
} | 2,416 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | getMostRecentDepositTimestampByOwnerAndToken | function getMostRecentDepositTimestampByOwnerAndToken(address owner, address token) external view returns (uint64);
| /**
* @return The most recent timestamp at which the `owner` deposited `token` into the yield farming contract for
* the current season. If there is no active season, this function returns `0`.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
9572,
9692
]
} | 2,417 |
DMGYieldFarmingRouter | contracts/external/farming/v1/IDMGYieldFarmingV1.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | IDMGYieldFarmingV1 | interface IDMGYieldFarmingV1 {
// ////////////////////
// Events
// ////////////////////
event GlobalProxySet(address indexed proxy, bool isTrusted);
event TokenAdded(address indexed token, address indexed underlyingToken, uint8 underlyingTokenDecimals, uint16 points);
event TokenRem... | /**
* The interface for DMG "Yield Farming" - A process through which users may earn DMG by locking up their mTokens in
* Uniswap pools, and staking the Uniswap pool's equity token in this contract.
*
* Yield farming in the DMM Ecosystem entails "rotation periods" in which a season is active, in order to incent... | NatSpecMultiLine | getMostRecentIndexedDmgEarnedByOwnerAndToken | function getMostRecentIndexedDmgEarnedByOwnerAndToken(address owner, address token) external view returns (uint);
| /**
* @return The most recent indexed amount of DMG earned by the `owner` for the deposited `token` which is being
* farmed for the most-recent season. If there is no active season, this function returns `0`.
*/ | NatSpecMultiLine | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
9940,
10058
]
} | 2,418 |
DigiMarket | contracts/DigiMarket.sol | 0x75c45905e903a66c8a109baf3cf13a49b5f67778 | Solidity | DigiMarket | contract DigiMarket is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeMath for uint8;
uint256 BIGNUMBER = 10 ** 18;
/******************
CONFIG
******************/
uint256 public purchaseFee = 1000; // 10%
uint256 public digiAmountRequired = 3000 * (BIGNUMB... | createSale | function createSale(
uint256 _tokenId,
address _tokenAddress,
uint256 _price,
uint256 _duration
)
public
requiredAmount(msg.sender, digiAmountRequired)
returns (uint256)
{
require(IERC721(_tokenAddress).ownerOf(_tokenId) == msg.sender, 'DigiMarket: User is not the token owner')... | /**
* @dev User creates sale for NFT.
*/ | NatSpecMultiLine | v0.6.5+commit.f956cc89 | None | ipfs://3b709d2dc8ce1599dbd3b3db10b7756a837d712c09c447638fc90ad5d43b07fd | {
"func_code_index": [
2735,
3908
]
} | 2,419 | ||
DigiMarket | contracts/DigiMarket.sol | 0x75c45905e903a66c8a109baf3cf13a49b5f67778 | Solidity | DigiMarket | contract DigiMarket is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeMath for uint8;
uint256 BIGNUMBER = 10 ** 18;
/******************
CONFIG
******************/
uint256 public purchaseFee = 1000; // 10%
uint256 public digiAmountRequired = 3000 * (BIGNUMB... | cancelSale | function cancelSale(
uint256 _saleId
)
public
inProgress(_saleId)
returns (uint256)
{
require(IERC721(sales[_saleId].tokenAddress).ownerOf(sales[_saleId].tokenId) == msg.sender, 'DigiMarket: User is not the token owner');
uint256 timeNow = _getTime();
sales[_saleId].endDate = time... | /**
* @dev User cancels sale for NFT.
*/ | NatSpecMultiLine | v0.6.5+commit.f956cc89 | None | ipfs://3b709d2dc8ce1599dbd3b3db10b7756a837d712c09c447638fc90ad5d43b07fd | {
"func_code_index": [
3967,
4452
]
} | 2,420 | ||
DigiMarket | contracts/DigiMarket.sol | 0x75c45905e903a66c8a109baf3cf13a49b5f67778 | Solidity | DigiMarket | contract DigiMarket is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeMath for uint8;
uint256 BIGNUMBER = 10 ** 18;
/******************
CONFIG
******************/
uint256 public purchaseFee = 1000; // 10%
uint256 public digiAmountRequired = 3000 * (BIGNUMB... | buy | function buy(uint256 _saleId)
public
inProgress(_saleId)
{
require(IERC721(sales[_saleId].tokenAddress).ownerOf(sales[_saleId].tokenId) == sales[_saleId].owner, 'DigiMarket: Sale creator user is not longer NFT owner');
require(IERC20(stableERC20).balanceOf(msg.sender) >= sales[_saleId].price, 'Digi... | /**
* @dev User buyes the NFT.
*/ | NatSpecMultiLine | v0.6.5+commit.f956cc89 | None | ipfs://3b709d2dc8ce1599dbd3b3db10b7756a837d712c09c447638fc90ad5d43b07fd | {
"func_code_index": [
4504,
5982
]
} | 2,421 | ||
DigiMarket | contracts/DigiMarket.sol | 0x75c45905e903a66c8a109baf3cf13a49b5f67778 | Solidity | DigiMarket | contract DigiMarket is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeMath for uint8;
uint256 BIGNUMBER = 10 ** 18;
/******************
CONFIG
******************/
uint256 public purchaseFee = 1000; // 10%
uint256 public digiAmountRequired = 3000 * (BIGNUMB... | withdrawAcumulatedFees | function withdrawAcumulatedFees() public {
uint256 total = IERC20(stableERC20).balanceOf(address(this));
for (uint8 i = 0; i < feesDestinators.length; i++) {
IERC20(stableERC20).transfer(
feesDestinators[i],
total.mul(feesPercentages[i]).div(100)
);
}... | /**
* @dev Send all the acumulated fees for one token to the fee destinators.
*/ | NatSpecMultiLine | v0.6.5+commit.f956cc89 | None | ipfs://3b709d2dc8ce1599dbd3b3db10b7756a837d712c09c447638fc90ad5d43b07fd | {
"func_code_index": [
6081,
6441
]
} | 2,422 | ||
DigiMarket | contracts/DigiMarket.sol | 0x75c45905e903a66c8a109baf3cf13a49b5f67778 | Solidity | DigiMarket | contract DigiMarket is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeMath for uint8;
uint256 BIGNUMBER = 10 ** 18;
/******************
CONFIG
******************/
uint256 public purchaseFee = 1000; // 10%
uint256 public digiAmountRequired = 3000 * (BIGNUMB... | setFee | function setFee(uint256 _purchaseFee) public onlyOwner() {
require(_purchaseFee <= 3000, "DigiMarket: Max fee 30%");
purchaseFee = _purchaseFee;
}
| /**
* @dev Sets the purchaseFee for every withdraw.
*/ | NatSpecMultiLine | v0.6.5+commit.f956cc89 | None | ipfs://3b709d2dc8ce1599dbd3b3db10b7756a837d712c09c447638fc90ad5d43b07fd | {
"func_code_index": [
6514,
6688
]
} | 2,423 | ||
DigiMarket | contracts/DigiMarket.sol | 0x75c45905e903a66c8a109baf3cf13a49b5f67778 | Solidity | DigiMarket | contract DigiMarket is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeMath for uint8;
uint256 BIGNUMBER = 10 ** 18;
/******************
CONFIG
******************/
uint256 public purchaseFee = 1000; // 10%
uint256 public digiAmountRequired = 3000 * (BIGNUMB... | setFeesDestinatorsWithPercentages | function setFeesDestinatorsWithPercentages(
address[] memory _destinators,
uint256[] memory _percentages
)
public
onlyOwner()
{
require(_destinators.length == _percentages.length, "DigiMarket: Destinators and percentageslenght are not equals");
uint256 total = 0;
for (uint8 i = 0;... | /**
* @dev Configure how to distribute the fees for user's withdraws.
*/ | NatSpecMultiLine | v0.6.5+commit.f956cc89 | None | ipfs://3b709d2dc8ce1599dbd3b3db10b7756a837d712c09c447638fc90ad5d43b07fd | {
"func_code_index": [
6779,
7388
]
} | 2,424 | ||
DigiMarket | contracts/DigiMarket.sol | 0x75c45905e903a66c8a109baf3cf13a49b5f67778 | Solidity | DigiMarket | contract DigiMarket is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeMath for uint8;
uint256 BIGNUMBER = 10 ** 18;
/******************
CONFIG
******************/
uint256 public purchaseFee = 1000; // 10%
uint256 public digiAmountRequired = 3000 * (BIGNUMB... | _getTime | function _getTime() internal view returns (uint256) {
return block.timestamp;
}
| /******************
PRIVATE FUNCTIONS
*******************/ | NatSpecMultiLine | v0.6.5+commit.f956cc89 | None | ipfs://3b709d2dc8ce1599dbd3b3db10b7756a837d712c09c447638fc90ad5d43b07fd | {
"func_code_index": [
7465,
7563
]
} | 2,425 | ||
ReserveManager | contracts/saga/interfaces/IReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | IReserveManager | interface IReserveManager {
/**
* @dev Get a deposit-recommendation.
* @param _balance The balance of the token-contract.
* @return The address of the wallet permitted to deposit ETH into the token-contract.
* @return The amount that should be deposited in order for the balance to reach `mid` ET... | /**
* @title Reserve Manager Interface.
*/ | NatSpecMultiLine | getDepositParams | function getDepositParams(uint256 _balance) external view returns (address, uint256);
| /**
* @dev Get a deposit-recommendation.
* @param _balance The balance of the token-contract.
* @return The address of the wallet permitted to deposit ETH into the token-contract.
* @return The amount that should be deposited in order for the balance to reach `mid` ETH.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
331,
420
]
} | 2,426 |
ReserveManager | contracts/saga/interfaces/IReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | IReserveManager | interface IReserveManager {
/**
* @dev Get a deposit-recommendation.
* @param _balance The balance of the token-contract.
* @return The address of the wallet permitted to deposit ETH into the token-contract.
* @return The amount that should be deposited in order for the balance to reach `mid` ET... | /**
* @title Reserve Manager Interface.
*/ | NatSpecMultiLine | getWithdrawParams | function getWithdrawParams(uint256 _balance) external view returns (address, uint256);
| /**
* @dev Get a withdraw-recommendation.
* @param _balance The balance of the token-contract.
* @return The address of the wallet permitted to withdraw ETH into the token-contract.
* @return The amount that should be withdrawn in order for the balance to reach `mid` ETH.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
727,
817
]
} | 2,427 |
ReserveManager | contracts/saga/interfaces/IPaymentManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | IPaymentManager | interface IPaymentManager {
/**
* @dev Retrieve the current number of outstanding payments.
* @return The current number of outstanding payments.
*/
function getNumOfPayments() external view returns (uint256);
/**
* @dev Retrieve the sum of all outstanding payments.
* @return The s... | /**
* @title Payment Manager Interface.
*/ | NatSpecMultiLine | getNumOfPayments | function getNumOfPayments() external view returns (uint256);
| /**
* @dev Retrieve the current number of outstanding payments.
* @return The current number of outstanding payments.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
168,
232
]
} | 2,428 |
ReserveManager | contracts/saga/interfaces/IPaymentManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | IPaymentManager | interface IPaymentManager {
/**
* @dev Retrieve the current number of outstanding payments.
* @return The current number of outstanding payments.
*/
function getNumOfPayments() external view returns (uint256);
/**
* @dev Retrieve the sum of all outstanding payments.
* @return The s... | /**
* @title Payment Manager Interface.
*/ | NatSpecMultiLine | getPaymentsSum | function getPaymentsSum() external view returns (uint256);
| /**
* @dev Retrieve the sum of all outstanding payments.
* @return The sum of all outstanding payments.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
360,
422
]
} | 2,429 |
ReserveManager | contracts/saga/interfaces/IPaymentManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | IPaymentManager | interface IPaymentManager {
/**
* @dev Retrieve the current number of outstanding payments.
* @return The current number of outstanding payments.
*/
function getNumOfPayments() external view returns (uint256);
/**
* @dev Retrieve the sum of all outstanding payments.
* @return The s... | /**
* @title Payment Manager Interface.
*/ | NatSpecMultiLine | computeDifferPayment | function computeDifferPayment(uint256 _ethAmount, uint256 _ethBalance) external view returns (uint256);
| /**
* @dev Compute differ payment.
* @param _ethAmount The amount of ETH entitled by the client.
* @param _ethBalance The amount of ETH retained by the payment handler.
* @return The amount of differed ETH payment.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
671,
778
]
} | 2,430 |
ReserveManager | contracts/saga/interfaces/IPaymentManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | IPaymentManager | interface IPaymentManager {
/**
* @dev Retrieve the current number of outstanding payments.
* @return The current number of outstanding payments.
*/
function getNumOfPayments() external view returns (uint256);
/**
* @dev Retrieve the sum of all outstanding payments.
* @return The s... | /**
* @title Payment Manager Interface.
*/ | NatSpecMultiLine | registerDifferPayment | function registerDifferPayment(address _wallet, uint256 _ethAmount) external;
| /**
* @dev Register a differed payment.
* @param _wallet The payment wallet address.
* @param _ethAmount The payment amount in ETH.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
939,
1020
]
} | 2,431 |
ENSMigrationSubdomainRegistrar | @ensdomains/subdomain-registrar/contracts/AbstractSubdomainRegistrar.sol | 0xe65d8aaf34cb91087d1598e0a15b582f57f217d9 | Solidity | AbstractSubdomainRegistrar | contract AbstractSubdomainRegistrar is RegistrarInterface {
// namehash('eth')
bytes32 constant public TLD_NODE = 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;
bool public stopped = false;
address public registrarOwner;
address public migration;
address public r... | setResolver | function setResolver(string memory name, address resolver) public owner_only(keccak256(bytes(name))) {
bytes32 label = keccak256(bytes(name));
bytes32 node = keccak256(abi.encodePacked(TLD_NODE, label));
ens.setResolver(node, resolver);
}
| /**
* @dev Sets the resolver record for a name in ENS.
* @param name The name to set the resolver for.
* @param resolver The address of the resolver
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://8751e27803ad5386d933139faf690ecb1e80c3045ffede7816138b0531f8d76b | {
"func_code_index": [
2120,
2395
]
} | 2,432 | ||
ENSMigrationSubdomainRegistrar | @ensdomains/subdomain-registrar/contracts/AbstractSubdomainRegistrar.sol | 0xe65d8aaf34cb91087d1598e0a15b582f57f217d9 | Solidity | AbstractSubdomainRegistrar | contract AbstractSubdomainRegistrar is RegistrarInterface {
// namehash('eth')
bytes32 constant public TLD_NODE = 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;
bool public stopped = false;
address public registrarOwner;
address public migration;
address public r... | configureDomain | function configureDomain(string memory name, uint price, uint referralFeePPM) public {
configureDomainFor(name, price, referralFeePPM, msg.sender, address(0x0));
}
| /**
* @dev Configures a domain for sale.
* @param name The name to configure.
* @param price The price in wei to charge for subdomain registrations
* @param referralFeePPM The referral fee to offer, in parts per million
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://8751e27803ad5386d933139faf690ecb1e80c3045ffede7816138b0531f8d76b | {
"func_code_index": [
2656,
2838
]
} | 2,433 | ||
ENSMigrationSubdomainRegistrar | @ensdomains/subdomain-registrar/contracts/AbstractSubdomainRegistrar.sol | 0xe65d8aaf34cb91087d1598e0a15b582f57f217d9 | Solidity | AbstractSubdomainRegistrar | contract AbstractSubdomainRegistrar is RegistrarInterface {
// namehash('eth')
bytes32 constant public TLD_NODE = 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;
bool public stopped = false;
address public registrarOwner;
address public migration;
address public r... | stop | function stop() public not_stopped registrar_owner_only {
stopped = true;
}
| /**
* @dev Stops the registrar, disabling configuring of new domains.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://8751e27803ad5386d933139faf690ecb1e80c3045ffede7816138b0531f8d76b | {
"func_code_index": [
2931,
3025
]
} | 2,434 | ||
ENSMigrationSubdomainRegistrar | @ensdomains/subdomain-registrar/contracts/AbstractSubdomainRegistrar.sol | 0xe65d8aaf34cb91087d1598e0a15b582f57f217d9 | Solidity | AbstractSubdomainRegistrar | contract AbstractSubdomainRegistrar is RegistrarInterface {
// namehash('eth')
bytes32 constant public TLD_NODE = 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;
bool public stopped = false;
address public registrarOwner;
address public migration;
address public r... | setMigrationAddress | function setMigrationAddress(address _migration) public registrar_owner_only {
require(stopped);
migration = _migration;
}
| /**
* @dev Sets the address where domains are migrated to.
* @param _migration Address of the new registrar.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://8751e27803ad5386d933139faf690ecb1e80c3045ffede7816138b0531f8d76b | {
"func_code_index": [
3163,
3313
]
} | 2,435 | ||
ENSMigrationSubdomainRegistrar | @ensdomains/subdomain-registrar/contracts/AbstractSubdomainRegistrar.sol | 0xe65d8aaf34cb91087d1598e0a15b582f57f217d9 | Solidity | AbstractSubdomainRegistrar | contract AbstractSubdomainRegistrar is RegistrarInterface {
// namehash('eth')
bytes32 constant public TLD_NODE = 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;
bool public stopped = false;
address public registrarOwner;
address public migration;
address public r... | query | function query(bytes32 label, string calldata subdomain) external view returns (string memory domain, uint price, uint rent, uint referralFeePPM);
| /**
* @dev Returns information about a subdomain.
* @param label The label hash for the domain.
* @param subdomain The label for the subdomain.
* @return domain The name of the domain, or an empty string if the subdomain
* is unavailable.
* @return price The price to register a subdomain, in ... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | None | bzzr://8751e27803ad5386d933139faf690ecb1e80c3045ffede7816138b0531f8d76b | {
"func_code_index": [
3946,
4097
]
} | 2,436 | ||
POTB | POTB.sol | 0xb1c96f736181fc1dc89577f752815f96f6ac92c5 | Solidity | POTB | contract POTB is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner = 0x990a10058406E445feE83127d5eB0e2977C43126;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapp... | POTB | function POTB(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol
) {
balanceOf[owner] = initialSupply; // Give the creator all initial tokens
totalSupply = initialSupply; // Update total supply
name = tokenName; ... | /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.12+commit.194ff033 | bzzr://180f5f0cfe76cc9618b281bc632d2d29ecd9595f2670d47162d989a351ce711b | {
"func_code_index": [
1034,
1722
]
} | 2,437 | |||
POTB | POTB.sol | 0xb1c96f736181fc1dc89577f752815f96f6ac92c5 | Solidity | POTB | contract POTB is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner = 0x990a10058406E445feE83127d5eB0e2977C43126;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapp... | transfer | function transfer(address _to, uint256 _value) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
(_value <= 0) throw;
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balance... | /* Send coins */ | Comment | v0.4.12+commit.194ff033 | bzzr://180f5f0cfe76cc9618b281bc632d2d29ecd9595f2670d47162d989a351ce711b | {
"func_code_index": [
1747,
2510
]
} | 2,438 | |||
POTB | POTB.sol | 0xb1c96f736181fc1dc89577f752815f96f6ac92c5 | Solidity | POTB | contract POTB is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner = 0x990a10058406E445feE83127d5eB0e2977C43126;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapp... | approve | function approve(address _spender, uint256 _value)
returns (bool success) {
(_value <= 0) throw;
allowance[msg.sender][_spender] = _value;
return true;
}
| /* Allow another contract to spend some tokens in your behalf */ | Comment | v0.4.12+commit.194ff033 | bzzr://180f5f0cfe76cc9618b281bc632d2d29ecd9595f2670d47162d989a351ce711b | {
"func_code_index": [
2583,
2780
]
} | 2,439 | |||
POTB | POTB.sol | 0xb1c96f736181fc1dc89577f752815f96f6ac92c5 | Solidity | POTB | contract POTB is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner = 0x990a10058406E445feE83127d5eB0e2977C43126;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapp... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
(_value <= 0) throw;
if (balanceOf[_from] < _value) throw; // Check if the sender has enoug... | /* A contract attempts to get the coins */ | Comment | v0.4.12+commit.194ff033 | bzzr://180f5f0cfe76cc9618b281bc632d2d29ecd9595f2670d47162d989a351ce711b | {
"func_code_index": [
2840,
3765
]
} | 2,440 | |||
POTB | POTB.sol | 0xb1c96f736181fc1dc89577f752815f96f6ac92c5 | Solidity | POTB | contract POTB is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner = 0x990a10058406E445feE83127d5eB0e2977C43126;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapp... | withdrawEther | function withdrawEther(uint256 amount) {
if(msg.sender != owner)throw;
owner.transfer(amount);
}
| // transfer balance to owner | LineComment | v0.4.12+commit.194ff033 | bzzr://180f5f0cfe76cc9618b281bc632d2d29ecd9595f2670d47162d989a351ce711b | {
"func_code_index": [
5276,
5382
]
} | 2,441 | |||
POTB | POTB.sol | 0xb1c96f736181fc1dc89577f752815f96f6ac92c5 | Solidity | POTB | contract POTB is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner = 0x990a10058406E445feE83127d5eB0e2977C43126;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapp... | function() payable {
}
| // can accept ether | LineComment | v0.4.12+commit.194ff033 | bzzr://180f5f0cfe76cc9618b281bc632d2d29ecd9595f2670d47162d989a351ce711b | {
"func_code_index": [
5408,
5437
]
} | 2,442 | ||||
ReserveManager | contracts/contract_address_locator/ContractAddressLocatorHolder.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ContractAddressLocatorHolder | contract ContractAddressLocatorHolder {
bytes32 internal constant _IAuthorizationDataSource_ = "IAuthorizationDataSource";
bytes32 internal constant _ISGNConversionManager_ = "ISGNConversionManager" ;
bytes32 internal constant _IModelDataSource_ = "IModelDataSource" ;
bytes32 inte... | /**
* @title Contract Address Locator Holder.
* @dev Hold a contract address locator, which maps a unique identifier to every contract address in the system.
* @dev Any contract which inherits from this contract can retrieve the address of any contract in the system.
* @dev Thus, any contract can remain "oblivious"... | NatSpecMultiLine | getContractAddressLocator | function getContractAddressLocator() external view returns (IContractAddressLocator) {
return contractAddressLocator;
}
| /**
* @dev Get the contract address locator.
* @return The contract address locator.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
3650,
3785
]
} | 2,443 |
ReserveManager | contracts/contract_address_locator/ContractAddressLocatorHolder.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ContractAddressLocatorHolder | contract ContractAddressLocatorHolder {
bytes32 internal constant _IAuthorizationDataSource_ = "IAuthorizationDataSource";
bytes32 internal constant _ISGNConversionManager_ = "ISGNConversionManager" ;
bytes32 internal constant _IModelDataSource_ = "IModelDataSource" ;
bytes32 inte... | /**
* @title Contract Address Locator Holder.
* @dev Hold a contract address locator, which maps a unique identifier to every contract address in the system.
* @dev Any contract which inherits from this contract can retrieve the address of any contract in the system.
* @dev Thus, any contract can remain "oblivious"... | NatSpecMultiLine | getContractAddress | function getContractAddress(bytes32 _identifier) internal view returns (address) {
return contractAddressLocator.getContractAddress(_identifier);
}
| /**
* @dev Get the contract address mapped to a given identifier.
* @param _identifier The identifier.
* @return The contract address.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
3949,
4112
]
} | 2,444 |
ReserveManager | contracts/contract_address_locator/ContractAddressLocatorHolder.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ContractAddressLocatorHolder | contract ContractAddressLocatorHolder {
bytes32 internal constant _IAuthorizationDataSource_ = "IAuthorizationDataSource";
bytes32 internal constant _ISGNConversionManager_ = "ISGNConversionManager" ;
bytes32 internal constant _IModelDataSource_ = "IModelDataSource" ;
bytes32 inte... | /**
* @title Contract Address Locator Holder.
* @dev Hold a contract address locator, which maps a unique identifier to every contract address in the system.
* @dev Any contract which inherits from this contract can retrieve the address of any contract in the system.
* @dev Thus, any contract can remain "oblivious"... | NatSpecMultiLine | isSenderAddressRelates | function isSenderAddressRelates(bytes32[] _identifiers) internal view returns (bool) {
return contractAddressLocator.isContractAddressRelates(msg.sender, _identifiers);
}
| /**
* @dev Determine whether or not the sender relates to one of the identifiers.
* @param _identifiers The identifiers.
* @return A boolean indicating if the sender relates to one of the identifiers.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
4344,
4530
]
} | 2,445 |
KnightsOfChain | @openzeppelin/contracts/access/Ownable.sol | 0x0e116154d53c89803af778aed251103096b7a67d | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://3f85fba9f91977800fe7afe140f075277492ffbd5e89bb4a30a95dc3d3138331 | {
"func_code_index": [
399,
491
]
} | 2,446 |
KnightsOfChain | @openzeppelin/contracts/access/Ownable.sol | 0x0e116154d53c89803af778aed251103096b7a67d | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://3f85fba9f91977800fe7afe140f075277492ffbd5e89bb4a30a95dc3d3138331 | {
"func_code_index": [
1050,
1149
]
} | 2,447 |
KnightsOfChain | @openzeppelin/contracts/access/Ownable.sol | 0x0e116154d53c89803af778aed251103096b7a67d | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://3f85fba9f91977800fe7afe140f075277492ffbd5e89bb4a30a95dc3d3138331 | {
"func_code_index": [
1299,
1496
]
} | 2,448 |
KnightsOfChain | @openzeppelin/contracts/access/Ownable.sol | 0x0e116154d53c89803af778aed251103096b7a67d | Solidity | KnightsOfChain | contract KnightsOfChain is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
string private baseURI;
uint256 public cost = 0.10 ether;
uint256 public maxSupply = 9999;
uint256 public maxMintAmount = 2;
uint256 public nftPerAddressLimit = 2;
uint256 public nftGi... | reveal | function reveal() external onlyOwner {
revealed = true;
}
| //only owner | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://3f85fba9f91977800fe7afe140f075277492ffbd5e89bb4a30a95dc3d3138331 | {
"func_code_index": [
3644,
3714
]
} | 2,449 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
94,
154
]
} | 2,450 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
235,
308
]
} | 2,451 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
530,
612
]
} | 2,452 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
889,
977
]
} | 2,453 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
1639,
1718
]
} | 2,454 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
2029,
2131
]
} | 2,455 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
259,
445
]
} | 2,456 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
721,
862
]
} | 2,457 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
1158,
1353
]
} | 2,458 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
1605,
2077
]
} | 2,459 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
2546,
2683
]
} | 2,460 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
3172,
3453
]
} | 2,461 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
3911,
4046
]
} | 2,462 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
4524,
4695
]
} | 2,463 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
606,
1230
]
} | 2,464 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
2158,
2560
]
} | 2,465 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
3314,
3492
]
} | 2,466 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
3715,
3916
]
} | 2,467 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
4284,
4515
]
} | 2,468 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | 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 ... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
4764,
5085
]
} | 2,469 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
493,
577
]
} | 2,470 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
1131,
1284
]
} | 2,471 | ||
CZELON | CZELON.sol | 0x81991133f1f125677754e062da07880b1e1d8c83 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender... | 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.6.12+commit.27d51765 | MIT | ipfs://218a732a73b81df30558be726a07e26bf715c0d3fd79687b16ae42e9867e48b0 | {
"func_code_index": [
1432,
1681
]
} | 2,472 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | sortTokens | function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), 'UniswapV2Library: ZERO_... | // returns sorted token addresses, used to handle return values from pairs sorted in this order | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
163,
517
]
} | 2,473 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | pairFor | function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(uint(keccak256(abi.encodePacked(
hex'ff',
factory,
keccak256(abi.encodePacked(token0, to... | // calculates the CREATE2 address for a pair without making any external calls | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
604,
19457
]
} | 2,474 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | getReserves | function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
(address token0,) = sortTokens(tokenA, tokenB);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
(reserveA, reserveB) = tokenA == t... | // fetches and sorts the reserves for a pair | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
19510,
19906
]
} | 2,475 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | quote | function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
amountB = amountA.mul(reserveB) / reserveA;
}
| // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
20014,
20340
]
} | 2,476 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | getAmountOut | function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint amountInWithFee = amountIn.mul(99... | // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
20457,
20979
]
} | 2,477 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | getAmountIn | function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint numerator = reserveIn.mul(amount... | // given an output amount of an asset and pair reserves, returns a required input amount of the other asset | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
21095,
21572
]
} | 2,478 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | getAmountsOut | function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[0] = amountIn;
for (uint i; i < path.length - 1; i++) {
(uint... | // performs chained getAmountOut calculations on any number of pairs | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
21649,
22165
]
} | 2,479 | ||
DMGYieldFarmingRouter | contracts/external/farming/libs/UniswapV2Library.sol | 0x85455fc1428ceee0072309f87a227d53783ba6a8 | Solidity | UniswapV2Library | library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV... | getAmountsIn | function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint i = path.length - 1; i > 0;... | // performs chained getAmountIn calculations on any number of pairs | LineComment | v0.5.13+commit.5b0b510c | Apache-2.0 | bzzr://109d8c35d03b8ade3d7a4b4f689a030d34e0cce256c34dbd0f4a6b95b7701a2e | {
"func_code_index": [
22241,
22778
]
} | 2,480 | ||
zsToken | contracts/zsToken.sol | 0x8e769eaa31375d13a1247de1e64987c28bed987e | Solidity | zsToken | contract zsToken is ERC20("Stabilize Strategy Multi-Token", "zs-USD"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
// Variables
uint256 constant divisionFactor = 100000;
StabilizePriceOracle private oracleContract; // A reference to the price oracle contract
// There are no f... | deposit | function deposit(uint256 amount, uint256 _tokenID) public nonReentrant {
uint256 total = valueOfVaultAndStrategy(); // Get token equivalent at strategy and here if applicable
require(depositsOpen == true, "Deposits have been suspended, but you can still withdraw");
require(currentStrategy != St... | // Now handle deposits into the strategy | LineComment | v0.6.6+commit.6c089d02 | GNU GPLv3 | ipfs://8e948a2b0bcce26275886d6ae593ebc412e92063b525d6ad037caba99c13731c | {
"func_code_index": [
6209,
8512
]
} | 2,481 | ||
zsToken | contracts/zsToken.sol | 0x8e769eaa31375d13a1247de1e64987c28bed987e | Solidity | zsToken | contract zsToken is ERC20("Stabilize Strategy Multi-Token", "zs-USD"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
// Variables
uint256 constant divisionFactor = 100000;
StabilizePriceOracle private oracleContract; // A reference to the price oracle contract
// There are no f... | withdrawPerPrice | function withdrawPerPrice(address _receiver, uint256 _withdrawAmount, bool _takeAll) internal {
uint256 length = tokenList.length;
if(_takeAll == true){
for(uint256 i = 0; i < length; i++){
if(tokenList[i].token.balanceOf(address(this)) > 0){
tokenList[i].token.safeTrans... | // This will withdraw the tokens from the contract based on their price, from lowest price to highest | LineComment | v0.6.6+commit.6c089d02 | GNU GPLv3 | ipfs://8e948a2b0bcce26275886d6ae593ebc412e92063b525d6ad037caba99c13731c | {
"func_code_index": [
11248,
13559
]
} | 2,482 | ||
zsToken | contracts/zsToken.sol | 0x8e769eaa31375d13a1247de1e64987c28bed987e | Solidity | zsToken | contract zsToken is ERC20("Stabilize Strategy Multi-Token", "zs-USD"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
// Variables
uint256 constant divisionFactor = 100000;
StabilizePriceOracle private oracleContract; // A reference to the price oracle contract
// There are no f... | stopDeposits | function stopDeposits() external onlyGovernance {
depositsOpen = false;
}
| // Governance functions
// Stop/start all deposits, no timelock required
// -------------------- | LineComment | v0.6.6+commit.6c089d02 | GNU GPLv3 | ipfs://8e948a2b0bcce26275886d6ae593ebc412e92063b525d6ad037caba99c13731c | {
"func_code_index": [
13684,
13776
]
} | 2,483 | ||
zsToken | contracts/zsToken.sol | 0x8e769eaa31375d13a1247de1e64987c28bed987e | Solidity | zsToken | contract zsToken is ERC20("Stabilize Strategy Multi-Token", "zs-USD"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
// Variables
uint256 constant divisionFactor = 100000;
StabilizePriceOracle private oracleContract; // A reference to the price oracle contract
// There are no f... | emergencyStopStrategy | function emergencyStopStrategy() external onlyGovernance {
depositsOpen = false;
if(currentStrategy != StabilizeStrategy(address(0)) && totalSupply() > 0){
currentStrategy.exit(); // Pulls all the tokens and accessory tokens from the strategy
}
currentStrategy = StabilizeStrategy(address(0... | // A function used in case of strategy failure, possibly due to bug in theplatform our strategy is using, governance can stop using it quick | LineComment | v0.6.6+commit.6c089d02 | GNU GPLv3 | ipfs://8e948a2b0bcce26275886d6ae593ebc412e92063b525d6ad037caba99c13731c | {
"func_code_index": [
14020,
14472
]
} | 2,484 | ||
zsToken | contracts/zsToken.sol | 0x8e769eaa31375d13a1247de1e64987c28bed987e | Solidity | zsToken | contract zsToken is ERC20("Stabilize Strategy Multi-Token", "zs-USD"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
// Variables
uint256 constant divisionFactor = 100000;
StabilizePriceOracle private oracleContract; // A reference to the price oracle contract
// There are no f... | startGovernanceChange | function startGovernanceChange(address _address) external onlyGovernance {
_timelockStart = now;
_timelockType = 1;
_timelock_address = _address;
}
| // Change the owner of the token contract
// -------------------- | LineComment | v0.6.6+commit.6c089d02 | GNU GPLv3 | ipfs://8e948a2b0bcce26275886d6ae593ebc412e92063b525d6ad037caba99c13731c | {
"func_code_index": [
15383,
15574
]
} | 2,485 | ||
zsToken | contracts/zsToken.sol | 0x8e769eaa31375d13a1247de1e64987c28bed987e | Solidity | zsToken | contract zsToken is ERC20("Stabilize Strategy Multi-Token", "zs-USD"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
// Variables
uint256 constant divisionFactor = 100000;
StabilizePriceOracle private oracleContract; // A reference to the price oracle contract
// There are no f... | startChangeStrategy | function startChangeStrategy(address _address) external onlyGovernance {
_timelockStart = now;
_timelockType = 2;
_timelock_address = _address;
_pendingStrategy = _address;
if(totalSupply() == 0){
// Can change strategy with one call in this case
finishChangeStrategy();
}... | // --------------------
// Change the treasury address
// -------------------- | LineComment | v0.6.6+commit.6c089d02 | GNU GPLv3 | ipfs://8e948a2b0bcce26275886d6ae593ebc412e92063b525d6ad037caba99c13731c | {
"func_code_index": [
15832,
16196
]
} | 2,486 | ||
zsToken | contracts/zsToken.sol | 0x8e769eaa31375d13a1247de1e64987c28bed987e | Solidity | zsToken | contract zsToken is ERC20("Stabilize Strategy Multi-Token", "zs-USD"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
// Variables
uint256 constant divisionFactor = 100000;
StabilizePriceOracle private oracleContract; // A reference to the price oracle contract
// There are no f... | startChangePriceOracle | function startChangePriceOracle(address _address) external onlyGovernance {
_timelockStart = now;
_timelockType = 3;
_timelock_address = _address;
}
| // --------------------
// Change the price oracle contract used, in case of upgrades
// -------------------- | LineComment | v0.6.6+commit.6c089d02 | GNU GPLv3 | ipfs://8e948a2b0bcce26275886d6ae593ebc412e92063b525d6ad037caba99c13731c | {
"func_code_index": [
17488,
17673
]
} | 2,487 | ||
VERANDEREN | VERANDEREN.sol | 0x4ccf916be7c11ea395c418b278f830a2b77f5f0f | Solidity | Context | contract Context {
constructor() internal {}
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns(address payable) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns(address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://506616be013ce90ccfe60b3e05aec3ccdff899dd1e6e94c3c8d2fcb97c7ab543 | {
"func_code_index": [
105,
207
]
} | 2,488 | ||
ReserveManager | contracts/saga/ReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ReserveManager | contract ReserveManager is IReserveManager, ContractAddressLocatorHolder, Claimable {
string public constant VERSION = "1.0.0";
using SafeMath for uint256;
struct Wallets {
address deposit;
address withdraw;
}
struct Thresholds {
uint256 min;
uint256 max;
u... | /**
* @title Reserve Manager.
*/ | NatSpecMultiLine | getETHConverter | function getETHConverter() public view returns (IETHConverter) {
return IETHConverter(getContractAddress(_IETHConverter_));
}
| /**
* @dev Return the contract which implements the IETHConverter interface.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
1129,
1270
]
} | 2,489 |
ReserveManager | contracts/saga/ReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ReserveManager | contract ReserveManager is IReserveManager, ContractAddressLocatorHolder, Claimable {
string public constant VERSION = "1.0.0";
using SafeMath for uint256;
struct Wallets {
address deposit;
address withdraw;
}
struct Thresholds {
uint256 min;
uint256 max;
u... | /**
* @title Reserve Manager.
*/ | NatSpecMultiLine | getPaymentManager | function getPaymentManager() public view returns (IPaymentManager) {
return IPaymentManager(getContractAddress(_IPaymentManager_));
}
| /**
* @dev Return the contract which implements the IPaymentManager interface.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
1368,
1517
]
} | 2,490 |
ReserveManager | contracts/saga/ReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ReserveManager | contract ReserveManager is IReserveManager, ContractAddressLocatorHolder, Claimable {
string public constant VERSION = "1.0.0";
using SafeMath for uint256;
struct Wallets {
address deposit;
address withdraw;
}
struct Thresholds {
uint256 min;
uint256 max;
u... | /**
* @title Reserve Manager.
*/ | NatSpecMultiLine | setWallets | function setWallets(uint256 _walletsSequenceNum, address _deposit, address _withdraw) external onlyOwner {
require(_deposit != address(0), "deposit-wallet is illegal");
require(_withdraw != address(0), "withdraw-wallet is illegal");
if (walletsSequenceNum < _walletsSequenceNum) {
walletsSequenceNum... | /**
* @dev Set the reserve wallets.
* @param _walletsSequenceNum The sequence-number of the operation.
* @param _deposit The address of the wallet permitted to deposit ETH into the token-contract.
* @param _withdraw The address of the wallet permitted to withdraw ETH from the token-contract.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
1844,
2452
]
} | 2,491 |
ReserveManager | contracts/saga/ReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ReserveManager | contract ReserveManager is IReserveManager, ContractAddressLocatorHolder, Claimable {
string public constant VERSION = "1.0.0";
using SafeMath for uint256;
struct Wallets {
address deposit;
address withdraw;
}
struct Thresholds {
uint256 min;
uint256 max;
u... | /**
* @title Reserve Manager.
*/ | NatSpecMultiLine | setThresholds | function setThresholds(uint256 _thresholdsSequenceNum, uint256 _min, uint256 _max, uint256 _mid) external onlyOwner {
require(_min <= _mid, "min-threshold is greater than mid-threshold");
require(_max >= _mid, "max-threshold is smaller than mid-threshold");
if (thresholdsSequenceNum < _thresholdsSequenceNu... | /**
* @dev Set the reserve thresholds.
* @param _thresholdsSequenceNum The sequence-number of the operation.
* @param _min The maximum balance which allows depositing ETH from the token-contract.
* @param _max The minimum balance which allows withdrawing ETH into the token-contract.
* @param _mid The balance that ... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
2864,
3532
]
} | 2,492 |
ReserveManager | contracts/saga/ReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ReserveManager | contract ReserveManager is IReserveManager, ContractAddressLocatorHolder, Claimable {
string public constant VERSION = "1.0.0";
using SafeMath for uint256;
struct Wallets {
address deposit;
address withdraw;
}
struct Thresholds {
uint256 min;
uint256 max;
u... | /**
* @title Reserve Manager.
*/ | NatSpecMultiLine | getDepositParams | function getDepositParams(uint256 _balance) external view returns (address, uint256) {
uint256 depositRecommendation = 0;
uint256 sdrPaymentsSum = getPaymentManager().getPaymentsSum();
uint256 ethPaymentsSum = getETHConverter().toEthAmount(sdrPaymentsSum);
if (ethPaymentsSum >= _balance || (_balance - e... | /**
* @dev Get a deposit-recommendation.
* @param _balance The balance of the token-contract.
* @return The address of the wallet permitted to deposit ETH into the token-contract.
* @return The amount that should be deposited in order for the balance to reach `mid` ETH.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
3837,
4475
]
} | 2,493 |
ReserveManager | contracts/saga/ReserveManager.sol | 0xcd53a7cff0686eb6ee1b7157ff184f8fc8a6ac4f | Solidity | ReserveManager | contract ReserveManager is IReserveManager, ContractAddressLocatorHolder, Claimable {
string public constant VERSION = "1.0.0";
using SafeMath for uint256;
struct Wallets {
address deposit;
address withdraw;
}
struct Thresholds {
uint256 min;
uint256 max;
u... | /**
* @title Reserve Manager.
*/ | NatSpecMultiLine | getWithdrawParams | function getWithdrawParams(uint256 _balance) external view returns (address, uint256) {
uint256 withdrawRecommendationAmount = 0;
if (_balance >= thresholds.max && getPaymentManager().getNumOfPayments() == 0){// _balance >= thresholds.max >= thresholds.mid
withdrawRecommendationAmount = _balance - thres... | /**
* @dev Get a withdraw-recommendation.
* @param _balance The balance of the token-contract.
* @return The address of the wallet permitted to withdraw ETH into the token-contract.
* @return The amount that should be withdrawn in order for the balance to reach `mid` ETH.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | GNU GPLv3 | bzzr://09f67a8aedd0d5d09573ac20a817125fc59f5b0b9bfce5a823b677d752fd2ed6 | {
"func_code_index": [
4782,
5234
]
} | 2,494 |
FUR | FUR.sol | 0xd319bedd2994cc2b0cf18972236800648341f0b2 | Solidity | FUR | contract FUR is StandardToken {
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces might not e... | FUR | function FUR() {
balances[msg.sender] = 1000000000000000; // Give the creator all initial tokens
totalSupply = 1000000000000000; // Update total supply
name = "FUR"; // Set the name for display purposes
decimals = 6; ... | // 0.1 standard. Just an arbitrary versioning scheme. | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://c39feb7afc923587cd9d12b8f7b3c150d2f0ad069c5c9ca80232ff2a5644b1bd | {
"func_code_index": [
800,
1299
]
} | 2,495 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
60,
124
]
} | 2,496 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
232,
309
]
} | 2,497 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
546,
623
]
} | 2,498 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
946,
1042
]
} | 2,499 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
1326,
1407
]
} | 2,500 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// ... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
1615,
1712
]
} | 2,501 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | HelpCoin | contract HelpCoin is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functi... | HelpCoin | function HelpCoin() {
balances[msg.sender] = 200000000000000000000000000; // Give the creator all initial tokens. This is set to 1000 for example. If you want your initial tokens to be X and your decimal is 5, set this value to X * 100000. (CHANGE THIS)
totalSupply = 200000000000000000000000000;... | // Where should the raised ETH go?
// This is a constructor function
// which means the following function name has to match the contract name declared above | LineComment | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
1196,
2217
]
} | 2,502 | |||
HelpCoin | HelpCoin.sol | 0x698797a625a833a287ee086bcf2b71aea184f070 | Solidity | HelpCoin | contract HelpCoin is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functi... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s... | /* Approves and then calls the receiving contract */ | Comment | v0.4.21+commit.dfe3193c | bzzr://4245e1e21419bd9c0ddd66c7410cf3b5dc0431726a4523e61765fe9c1d8cc585 | {
"func_code_index": [
2841,
3646
]
} | 2,503 | |||
MetaCityGame | MetaCityGame.sol | 0xafcc9ec6652972d84708183e2d4cc5783270c549 | 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 ... | 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.6.12+commit.27d51765 | BSD-3-Clause | ipfs://5dd2aac3ed36df599508f3134c0e37fd8230190881b91d5aac7412c679a35eb4 | {
"func_code_index": [
606,
1230
]
} | 2,504 | ||
MetaCityGame | MetaCityGame.sol | 0xafcc9ec6652972d84708183e2d4cc5783270c549 | 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 ... | 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.6.12+commit.27d51765 | BSD-3-Clause | ipfs://5dd2aac3ed36df599508f3134c0e37fd8230190881b91d5aac7412c679a35eb4 | {
"func_code_index": [
2160,
2562
]
} | 2,505 | ||
MetaCityGame | MetaCityGame.sol | 0xafcc9ec6652972d84708183e2d4cc5783270c549 | 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 ... | 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.6.12+commit.27d51765 | BSD-3-Clause | ipfs://5dd2aac3ed36df599508f3134c0e37fd8230190881b91d5aac7412c679a35eb4 | {
"func_code_index": [
3318,
3496
]
} | 2,506 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.