function stringlengths 12 63.3k | severity stringclasses 4
values |
|---|---|
```\nfunction setBuyFee(\n uint16 tax,\n uint16 liquidity,\n uint16 marketing,\n uint16 dev,\n uint16 donation\n) external onlyOwner {\n buyFee.tax = tax;\n buyFee.marketing = marketing;\n buyFee.liquidity = liquidity;\n buyFee.dev = dev;\n buyFee.donation = donation;\n}\n```\n | none |
```\nif (\_globalFee > BASIS\_POINTS) {\n revert InvalidFee();\n}\nStakingContractStorageLib.setGlobalFee(\_globalFee);\nif (\_operatorFee > BASIS\_POINTS) {\n revert InvalidFee();\n}\nStakingContractStorageLib.setOperatorFee(\_operatorFee);\n```\n | low |
```\nrequestLoan("1,000 debt tokens", "5% interest", "10 loan tokens for each collateral", "1 year")\n```\n | medium |
```\nfunction toString(ShortString sstr) internal pure returns (string memory) {\n uint256 len = byteLength(sstr);\n // using `new string(len)` would work locally but is not memory safe.\n string memory str = new string(32);\n /// @solidity memory-safe-assembly\n assembly {\n mstore(str, len)\n ... | none |
```\nfunction \_cacheFundraisingParams(\n address \_owner,\n string \_id,\n ERC20 \_collateralToken,\n MiniMeToken \_bondedToken,\n uint64 \_period,\n uint256 \_exchangeRate,\n uint64 \_openDate,\n uint256 \_reserveRatio,\n uint256 \_batc... | low |
```\nreceive() external payable {}\n```\n | none |
```\nfunction mint(uint256 pid, uint256 amount)\n external\n nonReentrant\n returns (uint256)\n{\n address lpToken = ichiFarm.lpToken(pid);\n IERC20Upgradeable(lpToken).safeTransferFrom(\n msg.sender,\n address(this),\n amount\n );\n if (\n IERC20Upgradeable(lpToken).all... | high |
```\nfunction toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return "0x00";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n}\n```\n | none |
```\n\_settleRedemption(\_recipient, \_mAssetQuantity, props.bAssets, bAssetQuantities, props.indexes, props.integrators, false);\n```\n | high |
```\nfunction _simulationOnlyValidations(UserOperation calldata userOp) internal view {\n // solhint-disable-next-line no-empty-blocks\n try this._validateSenderAndPaymaster(userOp.initCode, userOp.sender, userOp.paymasterAndData) {}\n catch Error(string memory revertReason) {\n if (bytes(revertReason).... | none |
```\nfunction swap(\n address inputToken,\n address outputToken,\n uint256 inputAmount,\n uint256 minOutputAmount\n)\n external\n payable\n onlyListedToken(inputToken)\n onlyListedToken(outputToken)\n override\n returns (uint256 outputAmount)\n{\n // Check that the exchange is unlocked and thus open for busi... | none |
```\nfunction setPayoutScheduleFixed(\n uint256[] calldata _payoutSchedule,\n address _payoutTokenAddress\n ) external onlyOpenQ {\n require(\n bountyType == OpenQDefinitions.TIERED_FIXED,\n Errors.NOT_A_FIXED_TIERED_BOUNTY\n );\n payoutSchedule = _payoutSched... | medium |
```\nreceive() external payable {}\n```\n | none |
```\nfunction transferTokens(\n address token,\n address from,\n address to,\n uint256 amount\n) internal {\n uint256 priorBalance = IERC20(token).balanceOf(address(to));\n require(IERC20(token).balanceOf(msg.sender) >= amount, 'THL01');\n```\n | low |
```\n IERC20(USDC).approve(jusdExchange, borrowBalance);\n IJUSDExchange(jusdExchange).buyJUSD(borrowBalance, address(this));\n IERC20(USDC).safeTransfer(to, USDCAmount - borrowBalance);\n JUSDAmount = borrowBalance;\n }\n```\n | medium |
```\nfunction getLiquidity() public view returns (uint256) {\n return liquidity;\n}\n```\n | none |
```\nfunction withdraw(uint256 _share) public {\n // Gets the amount of xABR in existence\n uint256 totalShares = totalSupply();\n // Calculates the amount of ABR the xABR is worth\n uint256 what = _share * ABR.balanceOf(address(this)) / totalShares;\n _burn(msg.sender, _share);\n ABR.transfer(msg.sen... | none |
```\nfunction release(address beneficiary) public {\n uint256 unreleased = getReleasableAmount(beneficiary);\n require(unreleased > 0, "Nothing to release");\n\n TokenAward storage award = getTokenAwardStorage(beneficiary);\n award.released += unreleased;\n\n targetToken.safeTransfer(beneficiary, unreleased);\n\n ... | low |
```\nrequire(\_measurementMultiple >= 1e6 && \_measurementMultiple <= 1e10, "MM out of range");\n```\n | low |
```\nfunction supplyNativeToken(address user) internal nonReentrant {\n WethInterface(weth).deposit{value: msg.value}();\n IERC20(weth).safeIncreaseAllowance(address(ironBank), msg.value);\n ironBank.supply(address(this), user, weth, msg.value);\n}\n```\n | high |
```\nuint256 tradeFee = ILeverageModule(vault.moduleAddress(FlatcoinModuleKeys._LEVERAGE_MODULE_KEY)).getTradeFee(\n vault.getPosition(tokenId).additionalSize\n);\n```\n | high |
```\nburnFrom(from, amountFGEN);\ncommittedFGEN[from] = 0;\n\npayable(to).transfer(total);\n```\n | medium |
```\nfunction _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n) private {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tLiquidity,\n uint256 tWallet,\n uint256 tDonation\n ) = _getTValues(tAmount);\n (uint256 rAmount, uint25... | none |
```\nfunction _buy(uint256 minTokenOut, uint256 deadline)\n public\n payable\n nonReentrant\n returns (bool)\n{\n // deadline requirement\n require(deadline >= block.timestamp, "Deadline EXPIRED");\n\n // Frontrun Guard\n _lastBuyBlock[msg.sender] = block.number;\n\n // liquidity is set\n ... | none |
```\n function SetZauction(address zauctionaddress) external onlyAdmin{\n zauction = zauctionaddress;\n emit ZauctionSet(zauctionaddress);\n }\n\n function SetAdmin(address newadmin) external onlyAdmin{\n admin = newadmin;\n emit AdminSet(msg.sender, newadmin);\n }\n```\n | high |
```\nfunction add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, "SafeMath: addition overflow");\n return c;\n}\n```\n | none |
```\n/// @notice Constructor method allowing us to prevent calls to initCLFR by setting the appropriate version\nconstructor(uint256 \_version) {\n VERSION\_SLOT.setUint256(\_version);\n}\n```\n | low |
```\nfunction supplyTokenTo(uint256 \_amount, address to) override external {\n uint256 shares = \_tokenToShares(\_amount);\n\n \_mint(to, shares);\n\n // NOTE: we have to deposit after calculating shares to mint\n token.safeTransferFrom(msg.sender, address(this), \_amount);\n\n \_depositInVault();\n\n ... | high |
```\nfunction setTaxFeePercent(uint256 taxFee) external onlyOwner() {\n require(taxFee <= _maxTaxFee, "Tax fee must be less than or equal to _maxTaxFee");\n _taxFee = taxFee;\n emit TaxFeeUpdated(taxFee);\n}\n```\n | none |
```\nfunction _validateMaxLTV(uint256 strategyId) internal view {\n uint256 debtValue = bank.getDebtValue(bank.POSITION_ID());\n (, address collToken, uint256 collAmount, , , , , ) = bank\n .getCurrentPositionInfo();\n uint256 collPrice = bank.oracle().getPrice(collToken);\n uint256 collValue = (coll... | high |
```\nfunction swapAndLiquify(uint256 amount) private lockTheSwap {\n\n // get portion for marketing/liquidity\n uint256 marketingAmt = (amount * 67) / (10**2);\n uint256 liquidityAmt = amount - marketingAmt;\n \n // send eth to marketing\n uint256 marketingBalance = swapTokensGetBalance(marketingAmt);... | none |
```\nfunction callFunction(\n address sender,\n Account.Info calldata account,\n bytes calldata data\n) external override {\n require(msg.sender == \_dydxSoloMargin && sender == address(this), Errors.VL\_NOT\_AUTHORIZED);\n account;\n\n FlashLoan.Info memory info = abi.decode(data, (FlashLoan.Info));\n\n uint256 \_valu... | low |
```\nfunction totalSupply() public view override returns (uint256) {\n return _tTotal;\n}\n```\n | none |
```\nconstructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n}\n```\n | none |
```\nfunction safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");\n uint256 newAllowance = o... | none |
```\n/\*\*\n \* @title Extremely simple implementation of `IStrategy` interface.\n \* @author Layr Labs, Inc.\n \* @notice Simple, basic, "do-nothing" Strategy that holds a single underlying token and returns it on withdrawals.\n \* Assumes shares are always 1-to-1 with the underlyingToken.\n \* @dev Unlike `StrategyBa... | low |
```\n// TapiocaOmnichainReceiver.sol\nfunction lzCompose( \n address _from,\n bytes32 _guid,\n bytes calldata _message,\n address, //executor\n bytes calldata //extra Data\n ) external payable override {\n // rest of code\n \n // Decode LZ compose message.\n ... | high |
```\nfunction claim(\n uint256 policyIndex\_,\n uint256 amount\_,\n address receipient\_\n) external onlyPoolManager {\n```\n | high |
```\nfunction safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n}\n```\n | none |
```\nIAccount(account).updateActionTimestampByCreditor();\n\nasset.safeTransfer(actionTarget, amountBorrowed);\n\n{\n uint256 accountVersion = IAccount(account).flashActionByCreditor(actionTarget, actionData);\n if (!isValidVersion[accountVersion]) revert LendingPoolErrors.InvalidVersion();\n}\n```\n | medium |
```\nassert(\_blockNumber > \_blockheaders.length);\n```\n | medium |
```\nfunction verify(\n bytes calldata inputTxBytes,\n uint16 outputIndex,\n uint256 inputTxPos,\n bytes calldata spendingTxBytes,\n uint16 inputIndex,\n bytes calldata signature,\n bytes calldata /\*optionalArgs\*/\n)\n external\n view\n returns (bool)\n{\n PaymentTransactionModel.Tran... | high |
```\nfunction isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 c... | none |
```\nfunction sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, "SafeMath: subtraction overflow");\n}\n```\n | none |
```\nFile: Stable2TokenOracleMath.sol\n function _validateSpotPriceAndPairPrice(\n StableOracleContext calldata oracleContext,\n TwoTokenPoolContext calldata poolContext,\n StrategyContext memory strategyContext,\n uint256 oraclePrice,\n uint256 primaryAmount, \n uint256 sec... | high |
```\n function _revertIfLotConcluded(uint96 lotId_) internal view virtual {\n // Beyond the conclusion time\n if (lotData[lotId_].conclusion < uint48(block.timestamp)) {\n revert Auction_MarketNotActive(lotId_);\n }\n\n // Capacity is sold-out, or cancelled\n if (lotData... | medium |
```\nif (!instance.transfer(getSendAddress(), forwarderBalance)) {\n revert('Could not gather ERC20');\n}\n```\n | high |
```\n/// @dev pause the transceiver.\nfunction _pauseTransceiver() internal {\n _pause();\n}\n```\n | low |
```\nfunction setAutoClaim(bool value) external {\n dividendTracker.setAutoClaim(msg.sender, value);\n}\n```\n | none |
```\nfunction depositSwap(\n int256 swapAmount, // (-) token1, (+) token0 for token1; amount to swap\n uint256 deposit0,\n uint256 deposit1,\n address to,\n address from,\n bytes memory path,\n address pos,\n address \_router\n) external returns (uint256 shares) {\n```\n | high |
```\nFile: VaultConfiguration.sol\n if (vaultAccount.tempCashBalance < 0) {\n int256 x = vaultConfig.primeRate.convertToUnderlying(vaultAccount.tempCashBalance).neg();\n underlyingExternalToRepay = underlyingToken.convertToUnderlyingExternalWithAdjustment(x).toUint();\n ... | medium |
```\nFile: TreasuryAction.sol\n function _executeRebalance(uint16 currencyId) private {\n IPrimeCashHoldingsOracle oracle = PrimeCashExchangeRate.getPrimeCashHoldingsOracle(currencyId);\n uint8[] memory rebalancingTargets = _getRebalancingTargets(currencyId, oracle.holdings());\n (RebalancingDat... | medium |
```\n // due to sqrt computation error, sideTokens to sell may be very few more than available\n if (SignedMath.abs(tokensToSwap) > params.sideTokensAmount) {\n if (SignedMath.abs(tokensToSwap) - params.sideTokensAmount < params.sideTokensAmount / 10000) {\n tokensToSwap = SignedMath.revabs(para... | high |
```\n// @audit `price` is derived from `pool.slot0`\nshares = _amount1 + (_amount0 * price / PRECISION);\n```\n | low |
```\n/// constructor\n priceFeedDAIETH = AggregatorV3Interface(\n 0x773616E4d11A78F511299002da57A0a94577F1f4\n );\n\n/// getPrice()\n // chainlink price data is 8 decimals for WETH/USD, so multiply by 10 decimals to get 18 decimal fractional\n //(uint80 roundID, int256 price, uint256 startedAt, uint256 ti... | high |
```\nfunction sendERC20ToMain(ERC20 token, uint256 amount)\n external\n payable\n onlySplitMain()\n{\n token.safeTransfer(address(splitMain), amount);\n}\n```\n | none |
```\nfunction sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n}\n```\n | none |
```\nfunction owner() public view returns (address) {\n return _owner;\n}\n```\n | none |
```\nfunction swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = uniswapV2Router.WETH();\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTran... | none |
```\nfunction symbol() public view returns (string memory) {\n return _symbol;\n}\n```\n | none |
```\nfunction verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n ... | none |
```\nif (operatorFee > 0) {\n (status, data) = operator.call{value: operatorFee}("");\n if (status == false) {\n revert FeeRecipientReceiveError(data);\n }\n}\n```\n | medium |
```\nfunction convertToShares(uint256 assets) public view virtual returns (uint256) {\n uint256 supply = totalSupply(); // Saves an extra SLOAD if totalSupply is non-zero.\n\n return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\n}\n```\n | medium |
```\n _exitBalancerPool(lpAmount_, minTokenAmounts_);\n\n // Calculate OHM and wstETH amounts received\n uint256 ohmAmountOut = ohm.balanceOf(address(this)) - ohmBefore;\n uint256 wstethAmountOut = wsteth.balanceOf(address(this)) - wstethBefore;\n\n // Calculate oracle expected wstETH received amount\n ... | high |
```\nreceive() external payable {}\n```\n | none |
```\nfunction setExcludeFees(address account, bool excluded) public onlyOwner {\n _isExcludedFromFees[account] = excluded;\n emit ExcludeFromFees(account, excluded);\n}\n```\n | none |
```\n// Check block\nrequire(\_block > getPricesBlock(), "Network prices for an equal or higher block are set");\n```\n | low |
```\nfile: QVBaseStrategy.sol\n function reviewRecipients(address[] calldata _recipientIds, Status[] calldata _recipientStatuses)\n external\n virtual\n onlyPoolManager(msg.sender)\n onlyActiveRegistration\n {\n // make sure the arrays are the same length\n uint256 recipi... | medium |
```\nfunction setNumberOfWinners(uint256 count) external onlyOwner {\n \_\_numberOfWinners = count;\n\n emit NumberOfWinnersSet(count);\n}\n```\n | high |
```\nFile: contracts\OperatorTokenomics\Operator.sol\n // transfer creates a new delegator: check if the delegation policy allows this "delegation"\n if (balanceOf(to) == 0) {\n if (address(delegationPolicy) != address(0)) {\n moduleCall(address(delegationPolicy), abi.encodeWithS... | medium |
```\n function _createHat(\n uint256 _id,\n string calldata _details,\n uint32 _maxSupply,\n address _eligibility,\n address _toggle,\n bool _mutable,\n string calldata _imageURI\n ) internal returns (Hat memory hat) {\n hat.details = _details;\n hat.... | medium |
```\nswapToken.transferFrom(\_from, swapTokenGraveyard, amount);\n```\n | high |
```\n/\*\*\n \* @dev Function used to inform about the fact the currently ongoing\n \* new relay entry generation operation timed out. As a result, the group\n \* which was supposed to produce a new relay entry is immediately\n \* terminated and a new group is selected to produce a new relay entry.\n \* All members of ... | high |
```\nfunction \_withdrawReserves(address \_token, uint256 \_amount)\n external\n onlyOwner\n onlyMSD(\_token)\n{\n (uint256 \_equity, ) = calcEquity(\_token);\n\n require(\_equity >= \_amount, "Token do not have enough reserve");\n\n // Increase the token debt\n msdTokenData[\_token].debt = msdToke... | medium |
```\n// `token.allowance()``\nmstore(0xB00, ALLOWANCE\_CALL\_SELECTOR\_32)\nmstore(0xB04, caller())\nmstore(0xB24, address())\nlet success := call(gas(), token, 0, 0xB00, 0x44, 0xC00, 0x20)\n```\n | low |
```\nconstructor(\n address \_core,\n address \_target,\n uint256 \_incentive,\n uint256 \_frequency,\n uint256 \_initialMintAmount\n)\n CoreRef(\_core)\n Timed(\_frequency)\n Incentivized(\_incentive)\n RateLimitedMinter((\_initialMintAmount + \_incentive) / \_frequency, (\_initialMintAmount... | low |
```\nfunction updateTransferFee(uint256 newTransferFee) public onlyOwner {\n require (newTransferFee <= 5, "transfer fee cannot exceed 5%");\n transferFee = newTransferFee;\n emit UpdateTransferFee(transferFee);\n}\n```\n | none |
```\n function lockCapital(address _lendingPoolAddress)\n external\n payable\n override\n onlyDefaultStateManager\n whenNotPaused\n returns (uint256 _lockedAmount, uint256 _snapshotId)\n {\n// rest of code.\n uint256 _length = activeProtectionIndexes.length();\n for (uint256 i; i < _length; ) ... | high |
```\n function _setInitialMargin(address asset, uint16 value) private {\n require(value > 100, "below 1.0"); // @audit a value of 100 is 1x, so this should be > 101\n s.asset[asset].initialMargin = value;\n require(LibAsset.initialMargin(asset) < Constants.CRATIO_MAX, "above max CR");\n }\n\n... | low |
```\n function emergencyClose(GMXTypes.Store storage self, uint256 deadline) external {\n // Revert if the status is Paused.\n GMXChecks.beforeEmergencyCloseChecks(self);\n\n // Repay all borrowed assets; 1e18 == 100% shareRatio to repay\n GMXTypes.RepayParams memory _rp;\n (_rp.rep... | medium |
```\n function _allowedBorrow(address from, uint256 share) internal virtual override {\n if (from != msg.sender) {\n // TODO review risk of using this\n (uint256 pearlmitAllowed,) = penrose.pearlmit().allowance(from, msg.sender, address(yieldBox), collateralId);\n require(allo... | medium |
```\nFile: VaultAccountAction.sol\n function settleVaultAccount(address account, address vault) external override nonReentrant {\n requireValidAccount(account);\n require(account != vault);\n\n VaultConfig memory vaultConfig = VaultConfiguration.getVaultConfigStateful(vault);\n VaultAccou... | high |
```\nreceive() external payable {\n revert("DCBW721: Please use Mint or Admin calls");\n}\n```\n | none |
```\nmapping(uint256 => mapping(address => uint256)) private \_balances;\n```\n | medium |
```\nfunction processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n if (computedHash <= proofElement) {\n // Hash(current computed hash + curre... | none |
```\n params.minPrimary = poolContext._getTimeWeightedPrimaryBalance(\n oracleContext, strategyContext, bptToSettle\n );\n\n params.minPrimary = params.minPrimary * strategyContext.vaultSettings.balancerPoolSlippageLimitPercent / \n uint256(BalancerConstants.VAULT_PERCENT_BASIS);\n```\n | high |
```\n// signals to Beanstalk functions that they should not refund Eth\n// at the end of the function because the function is wrapped in a Farm function\nmodifier withEth() {\n if (msg.value > 0) s.isFarm = 2;\n _;\n if (msg.value > 0) {\n s.isFarm = 1;\n LibEth.refundEth();\n }\n}\n```\n | high |
```\n function addWithdrawRequest(uint256 _amountMLP, address _token) external {\n require(isAcceptingToken(_token), "ERROR: Invalid token");\n require(_amountMLP != 0, "ERROR: Invalid amount");\n \n address _withdrawer = msg.sender;\n // Get the pending buffer and ... | high |
```\nthe oracle process:\n\n1. the oracle node checks the latest price from reference exchanges and stores it with the oracle node's timestamp, e.g. time: 1000\n2. the oracle node checks the latest block of the blockchain, e.g. block 100, it stores this with the oracle node's timestamp as well\n3. the oracle node signs... | high |
```\nfunction _createLock(\n uint128 lockId,\n address tokenAddress,\n uint256 amount,\n bytes32 recipient,\n bytes4 destination\n) private returns (uint256, uint256, TokenInfo memory) {\n require(amount > 0, "Bridge: amount is 0");\n TokenInfo memory tokenInfo = tokenInfos[tokenAddress];\n requ... | none |
```\n// x ^ n\n// NOTE: n is a normal integer, do not shift 18 decimals\n// solium-disable-next-line security/no-assign-params\nfunction wpowi(int256 x, int256 n) internal pure returns (int256 z) {\n z = n % 2 != 0 ? x : \_WAD;\n\n for (n /= 2; n != 0; n /= 2) {\n x = wmul(x, x);\n\n if (n % 2 != 0)... | medium |
```\nfor (uint256 i = 0; i < \_teamsNumber; i++) {\n```\n | medium |
```\nfunction checkCollateralRatio(\n VaultConfig memory vaultConfig,\n VaultState memory vaultState,\n VaultAccount memory vaultAccount\n) internal view {\n (int256 collateralRatio, /\* \*/) = calculateCollateralRatio(\n vaultConfig, vaultState, vaultAccount.account, vaultAccount.vaultShares, vaultA... | low |
```\nfunction registerEmitterAndDomain(bytes memory encodedVaa) public {\n /* snip: parsing of Governance VAA payload */\n\n // Set the registeredEmitters state variable.\n registeredEmitters[foreignChain] = foreignAddress;\n\n // update the chainId to domain (and domain to chainId) mappings\n getChainTo... | low |
```\nif (validSignerCount <= target && validSignerCount != currentThreshold) {\n newThreshold = validSignerCount;\n} else if (validSignerCount > target && currentThreshold < target) {\n newThreshold = target;\n}\n```\n | high |
```\n function test_audit_frontrunFlagShort() public {\n address alice = makeAddr("Alice"); //Alice will front-run Bob's attempt to flag her short\n address aliceSecondAddr = makeAddr("AliceSecondAddr");\n address bob = makeAddr("Bob"); //Bob will try to flag Alice's short \n address randomUser = makeAddr("randomUs... | high |
```\nfunction numberDrawn(bytes32 _requestId, uint256 _randomness)\n external\n whenNotPaused\n requireAccount(_rngContract)\n nonReentrant\n{\n DrawData storage current = draws[_drawsToDate];\n require(\n current.randomNumberRequestId == _requestId,\n "DCBW721: Request ID mismatch"\n ... | none |
```\n function handleOutgoingRESDL(\n address _sender,\n uint256 _lockId,\n address _sdlReceiver\n )\n external\n onlyCCIPController\n onlyLockOwner(_lockId, _sender)\n updateRewards(_sender)\n updateRewards(ccipController)\n returns (Lock memory)\n ... | high |
```\nfunction sub(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a - b;\n require((b >= 0 && c <= a) || (b < 0 && c > a));\n return c;\n}\n```\n | none |
```\nfunction setBots(address[] memory bots_) public onlyOwner {\n for (uint i = 0; i < bots_.length; i++) {\n bots[bots_[i]] = true;\n }\n}\n```\n | none |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.