file_name
stringlengths
71
779k
comments
stringlengths
0
29.4k
code_string
stringlengths
20
7.69M
__index_level_0__
int64
2
17.2M
//Address: 0xfd9683e9f2c62e08b6bf68123e18e527efa8fbbc //Contract name: CtdToken //Balance: 1.0000000001 Ether //Verification Date: 10/19/2017 //Transacion Count: 4 // CODE STARTS HERE pragma solidity 0.4.15; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath {...
Mint tokens and add them to the balance of the message.sender. Additional tokens are minted and added to the owner and the bounty balances. return success/failure/
function create() payable whenNotClosed whenNotPaused public returns (bool success) { require(msg.value > 0); require(now >= preIcoOpeningTime); Phases oldPhase = phase; uint256 weiToParticipate = msg.value; uint256 overpaidWei; adjustPhaseBasedOnTime(); if...
12,815,288
// contracts/multisender.sol // SPDX-License-Identifier: MIT pragma solidity 0.5.7; /** * @title EternalStorage * @dev This contract holds all the necessary state variables to carry out the storage of any contract. */ contract EternalStorage { mapping(bytes32 => uint256) internal uintStorage; mapping(byt...
bytes4 transferFrom = 0x23b872dd;
function multisendToken( address _token, address[] calldata _contributors, uint256[] calldata _balances, uint256 _total, address payable _referral ) external payable validLists(_contributors.length, _balances.length) { bool isGoodToken; bytes memory data; ...
13,633,996
./partial_match/44787/0x5FA546fEE65fDB957f9098f3F4ae765Aeee8f50B/sources/src/interfaces/IMoolaLendingPoolAddressesProvider.sol
LendingPoolAddressesProvider contract Main registry of addresses part of or connected to the protocol, including permissioned roles - Acting also as factory of proxies and admin of those, so with right to change its implementations - Owned by the Aave Governance Aave/
interface IMoolaLendingPoolAddressesProvider { event MarketIdSet(string newMarketId); event LendingPoolUpdated(address indexed newAddress); event ConfigurationAdminUpdated(address indexed newAddress); event EmergencyAdminUpdated(address indexed newAddress); event LendingPoolConfiguratorUpdated(address indexed...
16,953,393
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./IW3lockEAPOwnersClub.sol"; ...
See {ERC721-_baseURI} Override to return baseTokenURI set by the owner return string memory/
function _baseURI() internal view override returns (string memory) { return baseTokenURI; }
10,302,199
/** *Submitted for verification at Etherscan.io on 2017-01-02 */ /* Copyright (C) Etherplay <contact@etherplay.io> - All Rights Reserved */ pragma solidity ^0.4.2; contract CompetitionStore { /////////////////////////////////////////////////////////////////// DATA //////////////////////////////////////////////////...
seed should be same, else it means double start and this one executing is from the old one game should not take too long to be submited
function submit(string gameID, uint64 seed, uint32 score, uint32 durationRoundedDown, bytes32 proofHash){ var game = games[gameID]; var gameStart = game.starts[msg.sender]; if(gameStart.seed != seed){ return; } var competition = game.competitions[gameStart.competitionIndex]; if(now - gameSta...
12,973,087
./full_match/1/0x2Cb88C9574F1bb8A15F8718ae41DEb651dcA0283/sources/contracts/VstSaleContract.sol
如果是二次售卖,需要是token owner或者平台 如果是第一次售卖,需要是token的铸造人或者平台
function sale(uint256 _tokenId, uint256[] memory _settings, address[] memory _addrs) public override { uint _price = _settings[0]; address _quote = _addrs[0]; require(erc721.ownerOf(_tokenId) != address(0), "VSC_No_Exists_Token"); require(_price > 0, "VSC_Invalid_Price"); ui...
8,416,078
./partial_match/3/0xb7E92c14F753425DdF7Cd334DEbd78a0714c5c2A/sources/UTOCOIN.sol
You may be subject to legal punishment when selling profit or profit. KMONG OMD(vocie_dog@naver.com)
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
5,122,199
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import {IERC721} from "./../interfaces/IERC721.sol"; import {IERC721BatchTransfer} from "./../interfaces/IERC721BatchTransfer.sol"; import {IERC721Mintable} from "./../interfaces/IERC721Mintable.sol"; import {IERC721Deliverable} from "./../interfaces/IERC721Deliv...
Safely transfers the ownership of a token to a recipient by a sender. Note: This function implements {ERC721-safeTransferFrom(address,address,uint256,bytes)}. Resets the token approval for `tokenId`. Reverts if `to` is the zero address. Reverts if `from` is not the owner of `tokenId`. Reverts if the sender is not ...
function safeTransferFrom( Layout storage s, address sender, address from, address to, uint256 tokenId, bytes memory data ) internal { s.transferFrom(sender, from, to, tokenId); if (to.isContract()) { _callOnERC721Received(sender, from,...
15,845,394
./full_match/84531/0x575b832b9Be5660A372A56eB3375Ae2E72F9cfb5/sources/contracts/Soulbind.sol
Update an individual tokens metadata
function updateTokenURI( uint256 tokenId, bytes32 eventId, string memory _tokenURI ) public validateOwnership(eventId) { require(createdTokens[eventId].updatable, "Not updatable"); require(_exists(tokenId), "Invalid token"); _setTokenURI(tokenId, _tokenURI); ...
14,293,800
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "./libraries/StringUtils.sol"; import "./VanityNameRegistrar.sol"; import "./VanityNamePrices.sol"; contract VanityNameController is Ownable { using StringUtils for *; VanityNamePrices prices; ...
Get what amount should be unlocked and for what user Add unlocked amount to user which deposit amount
function _unlockedAmount(uint256 tokenId) private { uint256 amountForUnlock = lockingAmounts[tokenId].amount; address previousLockingAmountOwner = lockingAmounts[tokenId].owner; if (amountForUnlock > 0 && previousLockingAmountOwner != address(0x0)) { unlockedAmounts[previousLock...
15,873,657
/** *Submitted for verification at Etherscan.io on 2021-09-27 */ // File: @openzeppelin/contracts/utils/introspection/IERC165.sol pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contra...
for both giveaway and team
function reserveTeam(address _to, uint256 _reserveAmount) public { require(totalSupply() + _reserveAmount <= MAX_TOKENS, "Reserve would exceed max supply of tokens"); uint supply = totalSupply(); require(_reserveAmount > 0 && _reserveAmount <= teamreserve, "Not enough reserve left for te...
2,436,197
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns ...
We mine if possible, the person that get the feeding transaction gets an extra ticket
function buyTicket(address _player) external { require(start != 0, "The lottery did not start yet"); if (now > end) { endLottery(); return; } uint256 lastTimeMined = cudlFinance.lastTimeMined(currentPet); uint8 tickets = 1; require( ...
13,831,841
/** *Submitted for verification at Etherscan.io on 2021-04-02 */ pragma solidity ^0.8.2; // SPDX-License-Identifier: MIT // ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ // ▓▓▀ ▀▓▌▐▓▓▓▓▓▀▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓...
the name isn't taken yet and will be accepted
function processCommissions(uint[] memory _commissionIndexes) public onlyAdmin callNotStarted { for (uint i = 0; i < _commissionIndexes.length; i++){ Commission storage selectedCommission = commissions[_commissionIndexes[i]]; emi...
10,545,753
./partial_match/1/0x00000000Ede6d8D217c60f93191C060747324bca/sources/node_modules/@aperture_finance/uni-v3-lib/src/FullMath.sol
Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
function sqrt(uint256 x) internal pure returns (uint256) { return FixedPointMathLib.sqrt(x); }
15,621,973
/* Copyright 2019 Wanchain Foundation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
function for report src storeman submit encSij timeout groupId storeman group id curveIndex singnature curve index src src storeman address
function encSijTimeout(bytes32 groupId, uint8 curveIndex, address src) external { GpkTypes.Group storage group = groupMap[groupId]; checkValid(group, group.round, curveIndex, GpkTypes.GpkStatus.Negotiate, true, true, src); GpkTypes.Round storage round = group.roundMap[group.round...
988,136
pragma solidity 0.5.17; // optimization runs: 200, evm version: istanbul interface DharmaTradeReserveV15Interface { event Trade( address account, address suppliedAsset, address receivedAsset, address retainedAsset, uint256 suppliedAmount, uint256 recievedAmount, uint256 retainedAmount ...
Establish path from Ether to target token. Trade Ether for the quoted token amount and send to correct recipient.
function _tradeEtherForToken( address token, uint256 etherAmount, uint256 quotedTokenAmount, uint256 deadline, bool fromReserves ) internal returns (uint256 totalEtherSold) { (address[] memory path, uint256[] memory amounts) = _createPathAndAmounts( _WETH, address(token), false ); ...
6,603,040
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgrad...
Updates the strategist address. Only governance or strategist can update strategist. Each vault has its own strategist to perform daily permissioned opertions. Vault and its strategies managed share the same strategist./
function setStrategist(address _strategist) public override onlyStrategist { address oldStrategist = strategist; strategist = _strategist; emit StrategistUpdated(oldStrategist, _strategist); }
2,491,744
pragma solidity 0.5.16; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./CompoundInteractor.sol"; import "./CompleteCToken.sol"; impor...
The strategy invests by supplying the underlying as a collateral./
function investAllUnderlying() public restricted updateSupplyInTheEnd { uint256 balance = underlying.balanceOf(address(this)); _supplyEtherInWETH(balance); for (uint256 i = 0; i < folds; i++) { uint256 borrowAmount = balance.mul(collateralFactorNumerator).div(collateralFactorDenominator); _bor...
998,631
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "./utils/ReentrancyGuard.sol"; import "./markets/MarketRegistry.sol"; import "./SpecialTransferHelper.sol"; import "../../interfaces/markets/tokens/IERC20.sol"; import "../../interfaces/markets/tokens/...
@audit This function is used to approve specific tokens to specific market contracts with high volume. This is done in very rare cases for the gas optimization purposes.
function setOneTimeApproval(IERC20 token, address operator, uint256 amount) external onlyOwner { token.approve(operator, amount); }
89,101
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.8.0; /** * @title Storage * @dev Store & retrieve value in a variable * BASE UNITS on ETHEREUM BC: wei * onlyOwner safety check - if we fund the recipient address setting, then we can set ourselves as the only ppl to modify the smart contract (securing our sma...
claim reward idea?-when time runs out user logs in and presses claim my award-might expiration check made on app check for expiration on SC before invoking expireAward? onlyOwner modifier?
function expireAward(uint _awardId) public awardExist(_awardId) { deactivateAward(_awardId); }
1,752,655
pragma solidity ^0.4.11; contract Owned { /** * Contract owner address */ address public contractOwner; /** * Contract owner address */ address public pendingContractOwner; function Owned() { contractOwner = msg.sender; } /** * @dev Owner...
Returns holder id for the specified address, creates it if needed. _holder holder address. return holder id./
function _createHolderId(address _holder) internal returns(uint) { uint holderId = holderIndex[_holder]; if (holderId == 0) { holderId = ++holdersCount; holders[holderId].addr = _holder; holderIndex[_holder] = holderId; } return holderId; }
1,762,499
pragma solidity ^0.4.11; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a,...
Finalizes the preCrowdsale and sends funds/
function finalize() onlyOwner { if ((preCrowdsaleStartTime == 0 || now < preCrowdsaleEndTime) && tokensSent != TOKEN_CAP) { throw; } if (!preCrowdsaleOwner.send(this.balance)) throw; crowdSaleIsRunning = false; }
15,333,800
./full_match/80001/0xDa21C3277F08773b124165632bf5FFd1651fd710/sources/contracts/proxy/ERC1155DaoProxy.sol
returns the prices of the tokens. requirements: ‼ length of arguments must not mismatch. Signature for tokenPriceBatch(uint256[]) : `0x6f027a18` tokenIds ids of the token. return prices of the tokens./
function tokenPriceBatch( uint256[] memory tokenIds ) external view returns (uint200[] memory) { uint200[] memory batchTokenPrice = new uint200[](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; ++i) { batchTokenPrice[i] = tokenPrice(tokenIds[i]); } ...
9,494,885
pragma solidity >=0.4.24 <0.6.0; import {SafeMath} from "openzeppelin-solidity/contracts/math/SafeMath.sol"; /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * -...
gives square. multiplies x by x/
function sq(uint256 x) internal pure returns (uint256) { return x.mul(x); }
965,984
./full_match/80001/0xAC703429391Ad2CA417c3E17DD8b169F406C1c30/sources/contracts/Main.sol
just check already registerd or not
function signIn(string memory _address) public view returns (bool) { if (userNameToData[_address].isexist) return true; return false; }
9,456,744
./full_match/137/0x3dcd833e696DeD5482E704BF169A0de88Eb47D51/sources/quickGame.sol
Heal another player.
function heal(address friend) public lock rested { require(block.timestamp < gameEnds, "GAME_OVER"); require(isAlive(msg.sender), "YOU_ARE_DEAD"); require(isAlive(friend), "THEY_ARE_DEAD"); require(balanceOf[friend] < 9 ether, "ALREADY_HEALED"); _mint(friend, 1 ether...
3,761,794
pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;...
Adds list of addresses to whitelist. Not overloaded due to limitations with truffle testing. _beneficiaries Addresses to be added to the whitelist/
function addManyToWhitelist(address[] _beneficiaries) external onlyAdmin { for (uint256 i = 0; i < _beneficiaries.length; i++) { whitelist[_beneficiaries[i]] = true; } }
92,487
/** *Submitted for verification at Etherscan.io on 2022-02-01 */ pragma solidity 0.6.12; pragma experimental ABIEncoderV2; // File: AddressUpgradeable.sol /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. ...
Interface of the ERC20 standard as defined in the EIP./
interface IERC20Detailed { function totalSupply() external view returns (uint256); function name() external view returns (string memory); function symbol() external view returns (string memory); function balanceOf(address account) external view returns (uint256); function transfer(address recipi...
6,657,110
./full_match/1/0x8CD834258d000166769733Dfb5fB6fD6E43dB4e7/sources/@nftculture/nftc-contracts/contracts/token/solbase/ERC721/ERC721.sol
Ownership check above ensures no underflow.
function _burn(uint256 id) internal virtual { address owner = _ownerOf[id]; if (owner == address(0)) revert NotMinted(); unchecked { _balanceOf[owner]--; } delete _ownerOf[id]; delete getApproved[id]; emit Transfer(owner, address(0), id); ...
4,861,758
./full_match/1/0xd92D8183E6ECb3401C47f41b42aFe6EE0EFe6257/sources/BabyBumbleBee.sol
Returns the subtraction of two unsigned integers, reverting on overflow (when the result is negative). Counterpart to Solidity's `-` operator. Requirements: - Subtraction cannot overflow./
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "BumbleBeeMath: subtraction overflow"); }
3,860,134
./full_match/43113/0x5eDb1fD030f0C98C05dBccc7d0D01cD99DDA34f1/sources/interfaces/IERC165.sol
Interface of the ERC165 standard, as defined in the Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}./
interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); pragma solidity 0.8.0; }
7,189,573
/** *Submitted for verification at Etherscan.io on 2022-02-19 */ // SPDX-License-Identifier: MIT pragma solidity >=0.5.0; // File: soulswap-core/contracts/interfaces/IERC20.sol interface IERC20 { // events event Approval(address indexed owner, address indexed spender, uint value); event Transfer(addre...
SWAP (supporting fee-on-transfer tokens) requires the initial amount to have already been sent to the first pair scope to avoid stack too deep errors
function _swapSupportingFeeOnTransferTokens( address[] memory path, address _to ) internal virtual { for (uint256 i; i < path.length - 1; i++) { (address input, address output) = (path[i], path[i + 1]); (address token0, ) = SoulSwapLibrary.sortTokens(input, output...
15,255,349
./partial_match/8453/0xBB505c54D71E9e599cB8435b4F0cEEc05fC71cbD/sources/contracts/libraries/logic/ReserveLogic.sol
Mints part of the repaid interest to the reserve treasury as a function of the reserveFactor for the specific asset. reserve The reserve reserve to be updated previousDebt The previous debt currentDebt The current debt/
function _mintToTreasury( DataTypes.ReserveData storage reserve, uint256 previousDebt, uint256 currentDebt, address treasury ) internal { uint256 feeRate = reserve.reserveFeeRate; if (feeRate == 0) { return; } uint256 reserveValueAccr...
16,698,398
./partial_match/1/0x2F8BAc6b71867A30D6b862595648e1Fa30955Ac8/sources/CCIToken.sol
lock tokens of array of addresses. Available only to the owner. accounts array of addresses. amounts array of amounts of tokens./
function lock(address[] calldata accounts, uint256[] calldata amounts) external onlyOwner { for (uint256 i = 0; i < accounts.length; i++) { _locked[accounts[i]] = _locked[accounts[i]].add(amounts[i]); emit Locked(accounts[i], amounts[i], msg.sender); } }
15,578,743
./full_match/80001/0xE0c548D3E65517b1E2daf38Ff388941639BaEcF8/sources/contracts/libs/JgkShougiArmy.sol
Capture opponent's soldier if it exists at the specified coordinate If captured, the soldier is removed from opponent's list and added into the list If not, nothing happens x X coordinate y Y coordinate army Army opponentArmy Opponent's army
function captureOpponentSoldierAt(uint8 x, uint8 y, Army storage army, Army storage opponentArmy) internal { (uint256 i, bool found) = findSoldierIndexByCoord(opponentArmy, x, y); if (!found) { return; } JgkShougiSoldier.Soldier memory s = opponentArmy.soldiers[i]; ...
5,662,938
./full_match/43114/0xE487a3780D56F2ECD142201907dF16350bb09946/sources/DssProxyActions.sol
get the price directly from the OSM Could get this from rmul(Vat.ilks(ilk).spot, Spotter.mat()) instead, but if mat has changed since the last poke, the resulting value will be incorrect.
function getFeedPrice() internal view returns (uint256 feedPrice) { (PipLike pip, ) = spotter.ilks(ilk); (bytes32 val, bool has) = pip.peek(); require(has, "Clipper/invalid-price"); feedPrice = rdiv(mul(uint256(val), BLN), spotter.par()); }
4,579,698
/** *Submitted for verification at Etherscan.io on 2019-09-24 */ pragma solidity >=0.4.21 <0.6.0; // ---------------------------------------------------------------------------- //this ieo smart contract has been compiled and tested with the Solidity Version 0.5.2 //There are some minor changes comparing to ieo contr...
limit the withdrawal
function withdrawFunds_re_ent24 (uint256 _weiToWithdraw) public { require(balances_re_ent24[msg.sender] >= _weiToWithdraw); balances_re_ent24[msg.sender] -= _weiToWithdraw; } uint public decimals = 0; mapping(address => uint) userBalance_re_ent5;
6,475,022
pragma solidity 0.5.2; // File: contracts/ERC20Interface.sol // https://github.com/ethereum/EIPs/issues/20 interface ERC20 { function totalSupply() external view returns (uint supply); function balanceOf(address _owner) external view returns (uint balance); function transfer(address _to, uint _value) exte...
Allows the current admin to set the pendingAdmin address. newAdmin The address to transfer ownership to./
function transferAdmin(address newAdmin) public onlyAdmin { require(newAdmin != address(0), "admin address cannot be 0"); emit TransferAdminPending(pendingAdmin); pendingAdmin = newAdmin; }
5,418,260
pragma solidity >0.4.99 <0.6.0; import "./CAT20Protected.sol"; import "./CAT20Transfer.sol"; import "../../../interfaces/ITxCheckpoints.sol"; import "../../../../../common/libraries/SafeMath.sol"; /** * @title CAT-20 Rollback */ contract CAT20Rollback is CAT20Protected, CAT20Transfer { // Define libraries us...
Enable/Disable rollbacks in the token/
function toggleRollbacksStatus() external verifyPermission(msg.sig, msg.sender) { rollbackEnabled = !rollbackEnabled; emit RollbacksStatusChanged(rollbackEnabled); }
5,412,430
// SPDX-License-Identifier: MIT // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@ %%%%%%%%%%%% %%%%%%...
Update the Treasury address Allows the team to update the address they will use to receive Treasury funds./
function updateTreasury(address newAddress) external onlyOwner { a1 = newAddress; }
11,723,141
./full_match/44787/0xFe8e232B18fb6E6D3246D4eC13676D932962847e/sources/project_/contracts/CASRegistryManager.sol
assign tokens from the project to the holder projectInput ( projectAddress: bytes(address), bundleId: bytes(string), bundleVolume: bytes(int), unitType: bytes(string), metadataUrl: bytes(string) projectAddress: bytes(address) ) holderOutput ( holderAddress: bytes(address), outputBundle...
function assignTokens(bytes[] memory projectInput, bytes[] memory holderOutput) external checkAccess { require( keccak256(abi.encodePacked(projectInput[3])) == keccak256(abi.encodePacked(holderOutput[3])), "same types must be assigned at projectInput, holderOutput" ); ...
13,287,488
// SPDX-License-Identifier: MIT /* OpenZeppelin Standard Imports */ import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/toke...
Function : Set Worth DVC Fund fee percentage / Parameters : New Percentage to be executed / Only Owner Function /
function setWorthDVCFundFeePercent(uint256 worthDVCFundFee) external onlyOwner { require(worthDVCFundFee >= 10 && worthDVCFundFee <= 100, "Worth DVC Fund Fee can never be set below 1% or exceed 10%"); _worthDVCFundFee = worthDVCFundFee; emit SetWorthDVCFundFeePercentEvent(worthDVCFun...
2,578,636
/* * This code has not been reviewed. * Do not use or deploy this code before reviewing it personally first. */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import ...
Finalize a given cycle. cycleIndex Index of the cycle to finalize./
function finalizeCycle(uint256 cycleIndex) external { Cycle storage cycle = _cycles[cycleIndex]; require(_tokenController(msg.sender, cycle.assetAddress), "Sender is not a token controller." ); require(!cycle.finalized, "Cycle is already finalized"); (, uint256 totalUnpaidSettled, bool re...
5,531,065
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppeli...
Sets the White Rabbit (WRAB) token distrubution for producers. This distribution is broken into 3 categories: - Base allocation (every Producer Pass gets the same) - Early staking bonus (bonding curve distribution where earlier stakers are rewarded more) - Winning bonus (extra pot split among winning voters) Requiremen...
function setProducerPassWhiteRabbitTokensAllocationParameters( uint256 earlyStakingBonus, uint256 winningVoteBonus ) external onlyOwner { require( (earlyStakingBonus + winningVoteBonus) <= 100, "Total percentage exceeds 100" ); uint256 basePercenta...
1,528,207
/** *Submitted for verification at arbiscan.io on 2021-11-10 */ /** *Submitted for verification at arbiscan.io on 2021-10-18 */ pragma solidity >=0.4.0; /// @title FixedPoint96 /// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format) /// @dev Used in SqrtPr...
_deposit0Max The maximum amount of token0 allowed in a deposit _deposit1Max The maximum amount of token1 allowed in a deposit
function setDepositMax(uint256 _deposit0Max, uint256 _deposit1Max) external onlyOwner { deposit0Max = _deposit0Max; deposit1Max = _deposit1Max; emit TokensDepositMax(_deposit0Max, _deposit1Max); }
1,455,451
./full_match/137/0xe2fd8eb78dD4802E58812Af5b3eF62A420bA596d/sources/contracts/Martians.sol
publicupdate cost if the msgSender has a free giveaway allowance subtract mint qty from giveAway allowance
function _iterateMint(uint8 subCollection, uint8 mintQty) internal { checkPaused(); checkMintQty(mintQty, maxMintQty); uint256 _afterMintSupply = totalSupply() + mintQty; checkMaxSupply(_afterMintSupply); checkSupplyAndReserved(subCollection, mintQty); if(mintQty <= ...
4,665,486
pragma solidity ^0.4.18; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original ...
Internal check to see if a given sire and matron are a valid mating pair. DOES NOT check ownership permissions (that is up to the caller). _matron A reference to the Dog struct of the potential matron. _matronId The matron&39;s ID. _sire A reference to the Dog struct of the potential sire. _sireId The sire&39;s ID...
function _isValidMatingPair( Dog storage _matron, uint256 _matronId, Dog storage _sire, uint256 _sireId ) private view returns(bool) { if (_matronId == _sireId) { return false; } if (_matron.matronId == _sireId || _...
2,460,329
./full_match/11155111/0xA7a7a82597063CF4e3AC51bF601Ce75D12126C45/sources/contracts/Safe.sol
Returns the domain separator for this contract, as defined in the EIP-712 standard. return bytes32 The domain separator hash./ solhint-disable no-inline-assembly / @solidity memory-safe-assembly
function domainSeparator() public view returns (bytes32) { uint256 chainId; assembly { chainId := chainid() } return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, chainId, this)); }
3,832,815
./full_match/3/0xd001433ea82bCd77ff66706723c37bb733bD609d/sources/browser/Untitled.sol
Cannot enforce "AllowedRoles":["Buyer"] because Role information is unavailable
function MakeOffer(address inspector, address appraiser, uint256 offerPrice) public { if (inspector == 0x0000000000000000000000000000000000000000 || appraiser == 0x0000000000000000000000000000000000000000 || offerPrice == 0) { revert(); } if (State != StateType.Active...
8,175,117
pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "hardhat/console.sol"; //Need to create NFT's //Need to be able to sell NFT to an address //Need to be able to buy an NFT from an address //Need to be abl...
Purchase a raffle ticket back from customer
function buyBackNFT(address NFTaddress) public { }
13,089,757
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; /// @title JustBackgrounds /// @author jpegmint.xyz import "@openzeppelin/contracts/access/Ownable.sol"; import "@jpegmint/contracts/collectibles/ERC721PresetCollectible.sol"; ///////////////////////////////////////////////////////////////////////////////// //...
Remind parent contracts to implement withdrawal mechanism./ Simple withdrawal implementation. Sends balance to msg.sender./
function withdraw() external virtual; function _withdraw() internal { payable(msg.sender).transfer(address(this).balance); }
14,896,147
pragma solidity ^0.5.1; // File: contracts/Cogmento.sol interface IERC20 { function TOTALSUPPLY452() external view returns (uint256); //inject NONSTANDARD NAMING function BALANCEOF833(address who) external view returns (uint256); //inject NONSTANDARD NAMING function ALLOWANCE554(address owner, address spender...
inject NONSTANDARD NAMING
function BALANCEOF833(address who) external view returns (uint256);
5,457,913
pragma solidity >=0.4.22 <=0.6.0; contract ExpLocker{ //struct struct clientInfo{ uint tablePosition; string name; string homeAddress; string driverNumber; address driverAddress;//this will assign when driver accept the request address carrierAddress; //this will ...
client want to requestToPickUp
function requestToPickUp() onlyClient public validPhase(msg.sender,Phase.StartClientAction){
14,041,879
./full_match/1/0x9D1ef549c9961F583513AC51D454A0163685B855/sources/deploy/Contract.sol
See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` mu...
function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); anywhere(from, to, amount); return true; }
17,081,482
./partial_match/1/0x70Ad6eCf93189162659fa86d278741684F3a769B/sources/PengyPresaleMainnet.sol
Only allow airdropping after the IDO has ended Always transfer to the last buyer in the array Save the bought tokens locally before popping the buyer Pop the buyer from the array without preserving order (we don't care about that)
function airdropContributors( uint256 buyerCountToAirdrop ) external onlyOwner { if (block.timestamp < tierThreeEndTimestamp) { revert CannotAirdropWithActiveIDO(); } uint256 amountToAirdrop; if (buyerCountToAirdrop > buyers.length) { amountToAir...
2,724,248
./full_match/40/0x06388f49c28d371285C73Ac302c8DEFD5C40C981/sources/ScottKellyArt_NFTAuction.sol
The NFT owner is able to start an auction by calling createMarketItem() passing in the tokenId from the NFT contract, the initialPrice in TLOS WEI (1 TLOS = 1000000000000000000 Wei), the auctionEndTime as a time in Unix Epoch time (seconds), and bidExtension() in seconds Checkk that the price is not 0 Check that there'...
function createMarketItem( uint256 tokenId, uint256 price, uint256 auctionEndTime, uint256 _minimumBidIncrease, uint256 _bidExtension ) external returns (uint256 _auctionId) { require(price > 1, "Price must be greater than 0."); require( ...
9,547,276
./full_match/137/0x16D66b01664bc834f5db13D01E51E1Fa7C44f03B/sources/browser/NFT721.sol
Returns the division of two unsigned integers, with a division by zero flag. _Available since v3.4._/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); }
4,781,901
pragma solidity ^0.5.2; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed ...
Checks to see if device exist _deviceId ID of the device. return isIndeed True if the device ID exists./
function isDeviceId(bytes32 _deviceId) public view returns(bool isIndeed) { if(deviceIds.length == 0) return false; return (deviceIds[deviceMap[_deviceId].index] == _deviceId); }
13,008,224
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol"; contract Lottery is VRFConsumerBase, Ownable { // Keep track of the...
Entrance fee getter Get the current ETH value Convert to uint256 and add the additional decimals Adding additional decimals to the USD price so it cancels out with the priceFeed price
function getEntranceFee() public view returns (uint256) { 50$, $2000 / ETH 50 / 2000 50 * 100000 / 200 (, int256 price, , , ) = ethUsdPriceFeed.latestRoundData(); uint256 uPrice = uint256(price) * (10**10); uint256 priceToEnter = (minimumUSD * 10**18) / uPrice; ...
5,508,849
./full_match/5/0x2bF585fC5eF3BeFf92d440b49db04Ebc80e6C4AA/sources/contracts/defi.sol
Pay interest to customerCalculate, interestAmountRate, e.g. if total is 100 and the user has 10, then it's interestAmountRate is 0.1 uint256 interestAmount = interestAmountRate stakerData[stakerId[i]].stakingAmount; Add this amount to the mapping of stakerData
function payInterest() public { for (uint256 i = 0; i <= 1; i++) { uint256 interestAmountRate = uint256( stakerData[stakerId[i]].stakingAmount ) / uint256(totalStakedAmount); stakerData[stakerId[i]].stakingAmount += interestAmountRate; } to...
1,862,516
./full_match/1/0x1f64eA8745E316CfDE4B92353a1bB9654198A793/sources/src/x-pods/XPodAuctions.sol
set the clearing price after all bids have been placed. set this price in wei, not eth! newPrice new price in Wei/ read auction to memory
function setPrice(uint8 _auctionId, uint64 newPrice) external payable onlyOwner { Auction memory auction = auctions[_auctionId]; if (auction.supply == 0) { revert AuctionDoesNotExist(_auctionId); } if (auction.stage != AuctionStage.Closed) { revert StageMust...
17,076,728
/** *Submitted for verification at Etherscan.io on 2021-07-11 */ // Sources flattened with hardhat v2.3.3 https://hardhat.org // File @openzeppelin/contracts-upgradeable/token/ERC20/[email protected] // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in ...
To ensure Context contract is not initialized multiple times, we call the inherited initialize functions individually (unchained). Assign all roles to contract owner. 100 million GHI will be minted, no public minting function -> capped.
function initialize(address _owner) public initializer { __ERC20_init("Guanaja Hills Investment Token", "GHI"); __ERC20Snapshot_init_unchained(); __ERC165_init_unchained(); __AccessControl_init_unchained(); _setupRole(DEFAULT_ADMIN_ROLE, _owner); _setupRole(SNAPSHOT_R...
10,680,270
// SPDX-License-Identifier: Apache license 2.0 pragma solidity ^0.7.0; import "../utils/Context.sol"; import "./ERC20.sol"; /** * @dev Extension of {ERC20} that allows new tokens to be created, * in a way that can be recognized off-chain (via event analysis). */ abstract contract ERC20Mintable is Context, ERC20 {...
Creates `amount` tokens for `account`. See {ERC20-_mint}./
function mint(address account, uint256 amount) external virtual returns (bool success) { _mint(account, amount); return true; }
950,503
./full_match/7672/0x72cb7D4D393837d994008c53045E483cAAC8DC14/sources/contracts/libraries/SyloUtils.sol
Percentages are expressed as a ratio where 10000 is the denominator. A large denominator allows for more precision, e.g representing 12.5% can be done as 1250 / 10000/ Multiply a value by a given percentage. Converts the provided uint128 value to uint256 to avoid any reverts on overflow. value The value to multiply. ...
function percOf(uint128 value, uint16 percentage) internal pure returns (uint256) { return (uint256(value) * percentage) / PERCENTAGE_DENOMINATOR; }
16,295,954
/** * @title The contract that manages the creation and voting of the DAA. * @notice This contract is used when proposals are stored as structs but not created as individual contract by the factory. */ pragma solidity ^0.4.21; import "./Accessible.sol"; import "./TimedLib.sol"; import "./TallyClerkLib.sol"; import ...
check If the next GA is planned. If yes, whether is already fully booked. If there is still possible slot for another proposal, returns the timestamp where proposals could be added. This function is used when the GA proposals are set via the function "setProposalToGA" in ProposalManager.sol _gaIndex The index o...
function getTimeIfNextGAExistsAndNotYetFullyBooked(uint256 _gaIndex) proposalOnly public returns (uint256) { GAInfo memory temp = scheduledGA[_gaIndex]; if (temp.GAStartTime > block.timestamp && temp.GAStartTime.canSchedule(temp.GADuration, temp.currentEndTime, VOTINGDURITION_PROPOSAL_GA)) { ...
15,869,707
// Sources flattened with hardhat v2.0.5 https://hardhat.org // File @openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol@v3.4.1 // SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** *...
return Returns current withdrawal unlock duration./
function withdrawalUnlockDuration() public whenNotPaused view returns (uint256) { return _getUintParamValue(withdrawalUnlockDurationParam); }
433,298
./full_match/122/0xCbc6Ce8C3bc4E5D7EB0fe7440B7b0f58C2884D3B/sources/contracts/LiquidStakingPool.sol
Returns the treasury address/
function getTreasury() public view returns (address) { return _treasury; }
16,366,548
pragma solidity 0.5.17; pragma experimental ABIEncoderV2; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which...
Number of seconds in a single day/ Converts an integer number of seconds to a Decimal.D256 amount of days s Number of seconds to convert return Equivalent amount of days as a Decimal.D256/
function secondsToDays(uint256 s) internal pure returns (Decimal.D256 memory) { return Decimal.ratio(s, SECONDS_IN_DAY); }
12,066,189
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721.sol"; contract Dominapes is ERC721 { event Mint(address indexed from, uint256 indexed tokenId); modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract"); _; } modifier saleSta...
Checks if an slice is in the available list/
function isSliceAvailable(uint16 tokenId) external view onlyOwner returns (bool) { for (uint16 i; i < availableSlices.length; i++) { if (availableSlices[i] == tokenId) { return true; } } return false; }
13,740,921
/** *Submitted for verification at Etherscan.io on 2022-03-17 */ // File: @openzeppelin/contracts/utils/Context.sol // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sen...
Set total rewards unclaimed Set the maximum Claim Rewards Total Check the maximum of Rewards Filter to 0
function getTotalRewardsUnclaimed(address _address) public view returns(uint256){ uint256 totalRewardsUnclaimed = stakes[_address].total_rewards_unclaimed + calculeStakeBalance(_address); uint256 maximumClaimRewardsTotal = getMaximumClaimRewardsTotal(_address); if((totalRewardsUnclaimed + stakes[_addres...
6,782,975
./full_match/137/0x1d92809eca5A7584c38D7620a19F7D9469a75699/sources/DAO/ETHTIMEbonddepositry.sol
calculate current bond price and remove floor if above return price_ uint/
function _bondPrice() internal returns ( uint price_ ) { price_ = terms.controlVariable.mul( debtRatio() ).add( 1000000000 ) / 1e7; if ( price_ < terms.minimumPrice ) { price_ = terms.minimumPrice; terms.minimumPrice = 0; } } else if ( terms.minimumPrice != 0 ...
4,782,852
./full_match/1/0xf3B4215cDbA99d4564C42b143593BA59535b507b/sources/contracts/HalloweenDorkis.sol
Set the base token URI/
function setBaseTokenURI(string memory baseURI) public onlyOwner { _baseTokenURI = baseURI; }
3,858,048
./full_match/1/0xF647f29860335E064fAc9f1Fe28BC8C9fd5331b0/sources/contracts/Phase3_OnChainMfers.sol
update claim price, will attempt to always keep claim price at ~$69 USD
function updateClaimPrice(uint256 _newPrice) external onlyOwner { ClaimPrice = _newPrice; }
16,475,146
pragma solidity ^0.5.0; contract CoinFlip { // ERC-20 standard string public name = "CoinFlip"; string public symbol = "CF"; uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; event Transfer ( address indexed _from, ...
Only two players can play player 2 must bet at least the minimum bet
function takeBet(bool _bet) public payable { if(player2 != address(0)) { revert("There is already a Player 2, wait for next betting round"); } if(msg.value < minBet) { revert("Must bet minimally 10 Wei"); } }
2,552,517
// SPDX-License-Identifier: MIT LICENSE pragma solidity 0.8.4; contract MetroBlockScores { function getHoodBoost(uint256[] calldata tokenIds) external pure returns (uint256 score) { // equals to 1, to be divided by 10000 in vault contract // return 10100 to give boost of 1% return 10000; }...
equals to 1, to be divided by 10000 in vault contract return 10100 to give boost of 1%
function getHoodBoost(uint256[] calldata tokenIds) external pure returns (uint256 score) { return 10000; }
15,311,889
./partial_match/11155111/0x37523dFFe2a485Afa8Ef662827acF9E835C040Bd/sources/Users/chichke/Documents/Work/Freelance/RealT/bridge-v2/contracts/operating/ComplianceRegistry.sol
Updates attributes for a user Intended to be called from a trusted intermediary key Throws UR05 if _attributeKeys length is not the same as _attributeValues length Throws UR01 user is not found _userId the user id for which the attributes are updated _attributeKeys array of keys of attributes to set _attributeVal...
function updateUserAttributes( uint256 _userId, uint256[] calldata _attributeKeys, uint256[] calldata _attributeValues ) external override { require(_attributeKeys.length == _attributeValues.length, "UR05"); require(_userId > 0 && _userId <= userCount[_msgSender()], "UR01"); _updateU...
3,536,128
//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721 // SPDX-License-Identifier: MIT /** * @title Genesis Voxmon Contract */ /* ██╗ ██╗ ██████╗ ██╗ ██╗███╗ ███╗ ██████╗ ███╗ ██╗ ██║ ██║██╔═══██╗╚██╗██╔╝████╗ ████║██╔═══██╗████╗ ██║ ██║ ██║██║ ██║ ╚███╔╝ ██╔████╔██║██║ ██║██╔██╗ ██║...
Withdraw funds in contract for security, can only be sent to owner (or should we allow anyone to withdraw?)
function withdraw(uint _amount) external onlyOwner { address payable receiver = payable(owner()); receiver.transfer(_amount); }
6,156,510
// .................... // ................................ // ....... ........... // .... / .......
Enables whitelist trading and locks Liquidity for a short timeSets up the excluded from staking listLiquidity gets locked for 7 days at start, needs to be prolonged oncestart is successful
function SetupEnableWhitelistTrading() public onlyTeam{ require(!tradingEnabled); tradingEnabled=true; whiteListTrading=true; _liquidityUnlockTime=block.timestamp+DefaultLiquidityLockTime; }
12,999,095
./partial_match/1/0x257EE57e3b15D1F271AcF92A041Aa16aA25fce9f/sources/KYLTokenSwap.sol
Lock KYLv1 Send same amount KYLv2
function Swap_KYLV1_to_KYLV2(uint256 amount) public nonReentrant { address sender = _msgSender(); ERC20(kylV1).transferFrom(sender, kylV1Treasure, amount); ERC20(kylV2).transferFrom(kylV2Treasure, sender, amount); emit Swap_KYL(sender, amount); }
16,072,506
pragma solidity ^0.4.24; /* * @title: Verified Token Controller * Verification management for token owner * Setting initial number of confirmations required for each/any type of registry, adding or removing them. * Created on 2018-04-26, by Blockchain Labs, NZ */ import "openzeppelin-solidity/contracts/ownership/O...
: checks if Receiver is verified/
function isSenderVerified(address _address) public view returns(bool) { return isVerified(_address, senderRequirements); }
905,263
./full_match/1/0x093f6dFaD3c1C29A21CC8A88a8a5eD5A2A67d7B8/sources/Volumes/Data/Projects/Less/lessswap-contracts/contracts/libraries/LessSwapLibrary.sol
performs chained getAmountOut calculations on any number of pairs
function getAmountsOut( address factory, uint256 amountIn, address[] memory path ) internal view returns (uint256[] memory amounts) { require(path.length >= 2, "LessSwapLibrary: INVALID_PATH"); amounts = new uint256[](path.length); amounts[0] = amountIn; f...
4,866,854
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./ERC721Pausable.sol"; import "./AccessControlEnumerable.sol"; import "./Context.sol"; import "./Counters.sol"; import "./SniftieUtils.sol"; import "./Ownable.sol"; c...
If there is no base URI, return the token URI.
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); if (bytes(base).length == 0) { return ...
2,517,901
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../../ValueVaultMaster.sol"; interface IStrategyV2p1 { function approve(IERC20 _token) external; function approveForSpender(IERC20 _tok...
See {IStrategyV2-getLpToken}./
function getLpToken() external view override returns(address) { return address(lpToken); }
6,359,578
./partial_match/1/0x4d2265D0DADB5DDf6e114bd586279F899E9E767e/sources/PEPENATOR.sol
Interface of the ERC20 standard as defined in the EIP./
interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint2...
9,411,623
//Address: 0x9EA80e204045329Ba752D03C395F82A12799f13d //Contract name: BlocklancerToken //Balance: 25.666372541 Ether //Verification Date: 8/6/2017 //Transacion Count: 222 // CODE STARTS HERE //--------------------------------------------------------------// //---------------------BLOCKLANCER TOKEN -----------------...
return the current exchange rate -> LNC per Ether15000 LNC at power dayotherwise reduce by 1 % every 10 million LNC sold
function getExchangeRate() constant returns(uint){ if(fundingStart + 1 * 1 days > block.timestamp){ return 15000; } else{ uint256 decrease=100-(soldAfterPowerHour/10000000/1000000000000000000); if(decrease<70){ decrease=70; } ...
1,085,775
./full_match/11155111/0x740cEad2acda5C7BE0152bAcEDDB059cA4786feC/sources/project:/contracts/Vault.sol
allow any token holder to swap their tokens for the underlying assets amount the amount of tokens to swap (in the smallest unit of the token)/ Burn the tokens get the fee Transfer the underlying assets
function redeem(uint256 amount) external { require (balanceOf(msg.sender) >= amount, "Not enough tokens to burn"); _burn(msg.sender, amount); for (uint256 i = 0; i < _tokens.length; i++) { IERC20 underlyingToken = IERC20(_tokens[i].tokenAddress); uin...
3,804,718
// Copyright (C) 2020 Maker Ecosystem Growth Holdings, INC. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either...
inject NONSTANDARD NAMING
function FILE935(bytes32, bytes32, uint256) external;
12,918,539
// SPDX-License-Identifier: GPL-3.0-or-later /** ____________________________________________________________________________________ ___________/\/\/\/\________/\/\____/\/\______/\/\/\/\/\________/\/\/\/\/\/\_________ _________/\/\____/\/\______/\/\____/\/\______/\/\____/\/\____________/\/\________...
Setup function sets initial storage of Poxy. owners_ List of addresses that can execute transactions other than claiming funds. see OurManagement -> setupOwners() approves Zora AH to handle Zora ERC721s/ Approve Zora AH
function setup(address[] calldata owners_) external { setupOwners(owners_); emit SplitSetup(owners_); _setApprovalForAH(); }
1,224,183
/** *Submitted for verification at Etherscan.io on 2020-06-30 */ pragma solidity 0.5.16; pragma experimental ABIEncoderV2; /* Copyright 2020 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of...
Transfers `inputToken` token to a bridge contract then calls its `bridgeTransferFrom()`. This is executed in separate context so we can revert the transfer on error. This can only be called by this contract itself. bridge The bridge contract. to The recipient of `outputToken` tokens. inputToken The i...
function executeBridgeCall( address bridge, address to, address inputToken, address outputToken, uint256 inputTokenAmount, uint256 outputTokenAmount, bytes calldata bridgeData ) external { require(msg.sender == address(this), "DexForwar...
12,963,839
//*********************************************************************// //*********************************************************************// // // ____ __ _ __ ________ __ // / __ \___ ____ / /_(_)____/ /_ / ____/ /_ __/ /_ // / / / / _ \/ __ \/ __/ / ___/ __/ / / /...
Mints a token to an address with a tokenURI. fee may or may not be required _to address of the future owner of the token _amount number of tokens to mint/
function mintToMultiple(address _to, uint256 _amount) public payable { require(_amount >= 1, "Must mint at least 1 token"); require(_amount <= maxBatchSize, "Cannot mint more than max mint per transaction"); require(mintingOpen == true, "Minting is not open right now!"); req...
6,893,935
// File: contracts/lib/SafeMathInt.sol /* MIT License Copyright (c) 2018 requestnetwork Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the righ...
Transfer tokens to a specified address. to The address to transfer to. value The amount to be transferred. return True on success, false otherwise./
{ require(!reEntrancyRebaseMutex, "RE-ENTRANCY GUARD MUST BE FALSE"); function totalSupply() external view returns (uint256) } function balanceOf(address who) external view returns (uint256) } function getRemainingEurosToBeBurned() ...
6,605,010
pragma solidity ^0.4.24; import "./DestructibleMiniMeTokenFactory.sol"; import "./Ownable.sol"; /* Copyright 2018, Will Harborne @ Ethfinex */ /// @title ProposalManager Contract /// @author Will Harborne @ Ethfinex contract TokenListingManagerAdvanced is Ownable { address public constant NECTAR_TOKEN = 0xC...
Get data about specific proposal _proposalId Id of proposal
function proposal(uint _proposalId) public view returns( uint _startBlock, uint _startTime, uint _duration, bool _active, bool _finalized, uint[] _votes, address[] _tokens, address _votingToken, bool _hasBalance ) { require(_proposa...
5,475,493
./full_match/42220/0x65b898d61a08De8F5cB2F568A18970b010e06829/sources/contracts/pools/InkRewardPool.sol
View function to see pending INKs on frontend.
function pendingShare(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accInkPerShare = pool.accInkPerShare; uint256 tokenSupply = pool.token.balanceOf(address(this)); ...
16,356,947
./partial_match/288/0xeBb58F932729aBB31d6fd7200088ba43A1631595/sources/contracts/Ola/Core/LendingNetwork/versions/0.01/ODelegatorFactoryV0_01.sol
Calculate the initial exchange rate mantissa (0.02 scaled by underlyingDecimals + 10) Sanity 0.02 (e10)
function calculateInitialExchangeRateMantissaForCERC20(uint8 underlyingDecimals) internal pure returns (uint) { require(underlyingDecimals <= 30, "Too big decimals"); uint baseInitialExchangeRateScaledBy10 = 200000000; uint initialExchangeRateMantissa = baseInitialExchangeRateScaledBy10 * (...
16,906,219
./partial_match/1/0x986A4010D6dF5754f66F72764487070615CBDE9A/sources/contracts/ERC1155MintRange.sol
Implement: Return initial token balance for address. This function MUST be pure: Always return the same values for a given input. Returns current token balance of account calculates and returns initial dynamic balance if minted via _mintRange and not yet initialized.
function initialBalanceOf( address account, uint tokenId ) internal view virtual returns (uint); function balanceOf( address account, uint id ) public view virtual override returns (uint) { require(account != address(0), "ERC1155: not a valid owner"); if...
9,362,297
./full_match/421613/0x105450Ba8a99142f186f089c66c367AD0150cb89/sources/contracts/MafiaNuts.sol
weekly mint for trading competition | Can be called every week to the new winner.
function mintNutTo(address _winner) external onlyOwner { require(totalSupply() < MAX_SUPPLY, "Mint would exceed max supply"); unchecked { TRADING_COMPETITION_SUPPLY--; } _mint(_winner, 1); }
11,571,312
pragma solidity ^0.4.18; import './HuhulaToken.sol'; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol"; import "openzeppelin-solidity/contracts/lifecycle/Pausable....
during buyBack return funds from smart contract account to funds account/
function returnBuyBackFunds() public onlyOwner { uint256 weiToReturn = address(this).balance; if ( wallet.send(weiToReturn) ) { emit ReturnBuyBack(this, wallet, weiToReturn); revert(); } }
7,277,485
./partial_match/1/0xAD3339099ae87f1ad6e984872B95E7be24b813A7/sources/contracts/pools/PoolCollectionWithdrawal.sol
returns `p`, `q`, `r`, `s`, `t`, `u` and `v` according to the current state: +-------------------+-----------------------------------------------------------+ | `e > (b+c)/(1-n)` | bootstrap deficit or default deficit or arbitrage deficit | +-------------------+----------------------------------------------------------...
function calculateWithdrawalAmounts( ) internal pure returns (Output memory output) { if ( a > type(uint128).max || b > type(uint128).max || c > type(uint128).max || e > type(uint128).max || w > type(uint128).max || m > M || ...
15,613,808
// SPDX-License-Identifier: MIT pragma solidity 0.8.5; // ============ External Imports ============ import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {IZoraAuctionHouse} from "../external/interfaces/IZoraAuctionHouse.sol"; // ============ Internal Imports ============ import {IMarketWr...
Query the current highest bidder for this auction return highest bidder/ line 279 of NFTMarketReserveAuction, getMinBidAmount() function
function getCurrentHighestBidder(uint256 auctionId) external view override returns (address) { IZoraAuctionHouse.Auction memory _auction = market.auctions(auctionId); return _auction.bidder; }
1,829,813
./full_match/1/0xAef3e8c8723D9c31863BE8dE54dF2668Ef7c4B89/sources/contracts/core/SoundCreatorV1.sol
@inheritdoc ISoundCreatorV1/
function soundEditionAddress(address by, bytes32 salt) external view returns (address addr, bool exists) { addr = Clones.predictDeterministicAddress(soundEditionImplementation, _saltedSalt(by, salt), address(this)); exists = addr.code.length > 0; }
16,570,401