text
stringlengths
203
50k
source
stringclasses
28 values
address
stringlengths
0
42
name
stringlengths
1
76
compiler
stringclasses
25 values
license
stringclasses
14 values
path
stringlengths
0
98
n_chars
int64
203
50k
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {IUniswapV2Pair} from '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import {UniswapV2Library} from './UniswapV2Library.sol'; import {UniswapImmutables} from '../UniswapImmutables.sol'; import {Permit2Payments} from '../../Permit...
github/uniswap-universal-router
V2SwapRouter
contracts/modules/uniswap/v2/V2SwapRouter.sol
6,063
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { BytesLib } from "solidity-bytes-utils/contracts/BytesLib.sol"; import { BitMap256 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/BitMaps.sol"; import { CalldataBytesLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs...
github/layerzero-v2
DVNOptions
packages/layerzero-v2/evm/messagelib/contracts/uln/libs/DVNOptions.sol
7,321
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/CalldataBytesLib.sol"; library ExecutorOptions { using CalldataBytesLib for bytes; uint8 internal constant WORKER_ID = 1; uint8 internal constant OPTION_TYPE_LZRECEIVE = 1; uint8 i...
github/layerzero-v2
ExecutorOptions
packages/layerzero-v2/evm/messagelib/contracts/libs/ExecutorOptions.sol
4,329
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { CalldataBytesLib } from "../../libs/CalldataBytesLib.sol"; library ExecutorOptions { using CalldataBytesLib for bytes; uint8 internal constant WORKER_ID = 1; uint8 internal constant OPTION_TYPE_LZRECEIVE = 1; uint8 internal cons...
github/layerzero-v2
ExecutorOptions
packages/layerzero-v2/evm/protocol/contracts/messagelib/libs/ExecutorOptions.sol
3,561
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/utils/ERC1363Utils.sol) pragma solidity ^0.8.20; import {IERC1363Receiver} from "../../../interfaces/IERC1363Receiver.sol"; import {IERC1363Spender} from "../../../interfaces/IERC1363Spender.sol"; /** * @dev Library that pr...
github/openzeppelin
ERC1363Utils
contracts/token/ERC20/utils/ERC1363Utils.sol
3,297
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20FlashMint.sol) pragma solidity ^0.8.20; import {IERC3156FlashBorrower} from "../../../interfaces/IERC3156FlashBorrower.sol"; import {IERC3156FlashLender} from "../../../interfaces/IERC3156FlashLender.sol"; imp...
github/openzeppelin
ERC20FlashMint
contracts/token/ERC20/extensions/ERC20FlashMint.sol
5,542
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC1363.sol) pragma solidity ^0.8.20; import {ERC20} from "../ERC20.sol"; import {IERC165, ERC165} from "../../../utils/introspection/ERC165.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; import {...
github/openzeppelin
ERC1363
contracts/token/ERC20/extensions/ERC1363.sol
5,631
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.24; import {ERC721} from "../ERC721.sol"; import {IERC721Enumerable} from "./IERC721Enumerable.sol"; import {IERC165} from "../../../utils/introspection/ERC165.sol"; /**...
github/openzeppelin
ERC721Enumerable
contracts/token/ERC721/extensions/ERC721Enumerable.sol
7,273
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20FlashMint.sol) pragma solidity ^0.8.20; import {IERC3156FlashBorrower} from "@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol"; import {IERC3156FlashLender} from "@openzeppelin/contracts/interfaces...
github/openzeppelin-upgradeable
ERC20FlashMintUpgradeable
contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol
5,869
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC1363.sol) pragma solidity ^0.8.20; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {ERC165Upgradeable} from "../....
github/openzeppelin-upgradeable
ERC1363Upgradeable
contracts/token/ERC20/extensions/ERC1363Upgradeable.sol
6,078
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {Constants} from '../libraries/Constants.sol'; import {ActionConstants} from '@uniswap/v4-periphery/src/libraries/ActionConstants.sol'; import {BipsLibrary} from '@uniswap/v4-periphery/src/libraries/BipsLibrary.sol'; import {PaymentsImmutable...
github/uniswap-universal-router
Payments
contracts/modules/Payments.sol
5,197
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin-upgrades/contracts/utils/math/SafeCastUpgradeable.sol"; /// @dev All scaling factors have `1e18` as an initial/default value. This value is represented /// by the constant `WAD`, w...
github/eigenlayer
SlashingLib
src/contracts/libraries/SlashingLib.sol
7,446
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {OperatorSet} from "eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IStrategy} from "eigenlayer-contracts/src/contr...
github/eigenlayer-middleware
BN254WeightedTableCalculator
src/middlewareV2/tableCalculator/unaudited/BN254WeightedTableCalculator.sol
7,673
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "@openzeppelin-upgrades/contracts/utils/cryptography/SignatureCheckerUpgradeable.sol"; /** * @title SignatureCheckerLib * @dev This library wraps the EIP1271SignatureUtils library to provide an external function for signature validation. * This a...
github/eigenlayer-middleware
SignatureCheckerLib
src/libraries/SignatureCheckerLib.sol
1,067
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import { ISlashingRegistryCoordinator, ISlashingRegistryCoordinatorTypes } from "../interfaces/ISlashingRegistryCoordinator.sol"; /// @title QuorumBitmapHistoryLib /// @notice This library operates on the _operatorBitmapHistory in the RegistryCoord...
github/eigenlayer-middleware
QuorumBitmapHistoryLib
src/libraries/QuorumBitmapHistoryLib.sol
6,829
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; import {ISignatureUtilsMixinTypes} from "eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol"; import {ECDSAStakeRegistry} from "../ECDSAStakeRegistry.sol"; import {IDelegationManager} from "eigenlayer-contracts/src/contracts/interface...
github/eigenlayer-middleware
ECDSAStakeRegistryPermissioned
src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol
4,420
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; interface IIndexRegistryErrors { /// @notice Thrown when a function is called by an address that is not the RegistryCoordinator. error OnlyRegistryCoordinator(); /// @notice Thrown when attempting to query a quorum that has no history. error...
github/eigenlayer-middleware
IIndexRegistry
src/interfaces/IIndexRegistry.sol
7,633
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; import {ISlashingRegistryCoordinator} from "./ISlashingRegistryCoordinator.sol"; import {IStakeRegistry} from "./IStakeRegistry.sol"; interface IEjectionManagerErrors { /// @notice Thrown when the caller is not the owner or ejector. error OnlyOwnerOrEje...
github/eigenlayer-middleware
IEjectionManager
src/interfaces/IEjectionManager.sol
6,036
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {ISlasher} from "./ISlasher.sol"; interface IVetoableSlasherErrors { /// @notice Thrown when a caller without veto committee privileges ...
github/eigenlayer-middleware
IVetoableSlasher
src/interfaces/IVetoableSlasher.sol
3,709
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol"; import {IAVSRegistrarInternal} from "./IAVSRegistrarInternal.sol"; import {ISocketRegistryV2} from "./ISocketRegistryV2.sol"; import {IAllowlist} from "./IAllowli...
github/eigenlayer-middleware
ITaskAVSRegistrarBase
src/interfaces/ITaskAVSRegistrarBase.sol
2,775
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {ISlashingRegistryCoordinator} from "./ISlashingRegistryCoordinator.sol"; import {IBLSApkRegistry} from "./IBLSApkRegistry.sol"; import {IStakeRegistry, IDelegationManager} from "./IStakeRegistry.sol"; import {BN254} from "../libraries/BN254.sol"; ...
github/eigenlayer-middleware
IBLSSignatureChecker
src/interfaces/IBLSSignatureChecker.sol
7,683
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { EndpointV2 } from "./EndpointV2.sol"; import { Errors } from "./libs/Errors.sol"; /// @notice this is the endpoint contract for layerzero v2 deployed on chains using ERC20 ...
github/layerzero-v2
EndpointV2Alt
packages/layerzero-v2/evm/protocol/contracts/EndpointV2Alt.sol
1,888
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // @dev Import the Origin so it's exposed to OAppPreCrimeSimulator implementers. // solhint-disable-next-line no-unused-import import { InboundPacket, Origin } from "../libs/Packet.sol"; /** * @title IOAppPreCrimeSimulator Interface * @dev Interface for the ...
github/layerzero-v2
IOAppPreCrimeSimulator
packages/layerzero-v2/evm/oapp/contracts/precrime/interfaces/IOAppPreCrimeSimulator.sol
1,920
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { IOAppReceiver, Origin } from "./interfaces/IOAppReceiver.sol"; import { OAppCore } from "./OAppCore.sol"; /** * @title OAppReceiver * @dev Abstract contract implementing the ILayerZeroReceiver interface and extending OAppCore for OApp receivers. */...
github/layerzero-v2
OAppReceiver
packages/layerzero-v2/evm/oapp/contracts/oapp/OAppReceiver.sol
5,410
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { MessagingParams, MessagingFee, MessagingReceipt } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import { OAppCore } f...
github/layerzero-v2
OAppSender
packages/layerzero-v2/evm/oapp/contracts/oapp/OAppSender.sol
5,631
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @dev Struct representing enforced option parameters. */ struct EnforcedOptionParam { uint32 eid; // Endpoint ID uint16 msgType; // Message Type bytes options; // Additional options } /** * @title IOAppOptionsType3 * @dev Interface for the...
github/layerzero-v2
IOAppOptionsType3
packages/layerzero-v2/evm/oapp/contracts/oapp/interfaces/IOAppOptionsType3.sol
1,442
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; /** * @title IOAppCore */ interface IOAppCore { // Custom error messages error OnlyPeer(uint32 eid, bytes32 sender); error NoP...
github/layerzero-v2
IOAppCore
packages/layerzero-v2/evm/oapp/contracts/oapp/interfaces/IOAppCore.sol
1,864
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @title IOAppMsgInspector * @dev Interface for the OApp Message Inspector, allowing examination of message and options contents. */ interface IOAppMsgInspector { // Custom error message for inspection failure error InspectionFailed(bytes message...
github/layerzero-v2
IOAppMsgInspector
packages/layerzero-v2/evm/oapp/contracts/oapp/interfaces/IOAppMsgInspector.sol
909
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { MessagingReceipt, MessagingFee } from "../../oapp/OAppSender.sol"; /** * @dev Struct representing token parameters for the OFT send() operation. */ struct SendParam { uint32 dstEid; // Destination endpoint ID. bytes32 to; // Recipient addres...
github/layerzero-v2
IOFT
packages/layerzero-v2/evm/oapp/contracts/oft/interfaces/IOFT.sol
6,161
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /// @title TransientContext /// @notice Library for transient storage. library TransientContext { /// @notice Slot for call depth. /// Equal to bytes32(uint256(keccak256("transient.calldepth")) - 1). bytes32 internal constant CALL_DEPTH_SLOT ...
github/optimism-bedrock
TransientContext
packages/contracts-bedrock/src/libraries/TransientContext.sol
4,168
// SPDX-License-Identifier: MIT pragma solidity 0.8.25; // Libraries import { PredeployAddresses } from "interop-lib/src/libraries/PredeployAddresses.sol"; // Interfaces import { IERC7802, IERC165 } from "interop-lib/src/interfaces/IERC7802.sol"; import { IL2ToL2CrossDomainMessenger } from "interop-lib/src/interfaces...
github/optimism-bedrock
CustomBridge
docs/public-docs/public/tutorials/CustomBridge.sol
4,360
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; import {IERC20Metadata} from "../../../interfaces/IERC20Metadata.sol"; /** * @ti...
github/openzeppelin
SafeERC20
contracts/token/ERC20/utils/SafeERC20.sol
13,963
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) pragma solidity ^0.8.20; /** * @dev Provides tracking nonces for addresses. Nonces will only increment. */ abstract contract Nonces { /** * @dev The nonce used for an `account` is not the expected current nonc...
github/openzeppelin
Nonces
contracts/utils/Nonces.sol
1,490
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual r...
github/openzeppelin
ERC165Checker
contracts/utils/introspection/ERC165Checker.sol
5,829
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (account/utils/draft-ERC7579Utils.sol) pragma solidity ^0.8.20; import {Execution} from "../../interfaces/draft-IERC7579.sol"; import {Packing} from "../../utils/Packing.sol"; import {Address} from "../../utils/Address.sol"; type Mode is...
github/openzeppelin
draft-ERC7579Utils
contracts/account/utils/draft-ERC7579Utils.sol
11,326
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (account/extensions/draft-AccountERC7579Hooked.sol) pragma solidity ^0.8.26; import {IERC7579Hook, MODULE_TYPE_HOOK} from "../../interfaces/draft-IERC7579.sol"; import {ERC7579Utils, Mode} from "../../account/utils/draft-ERC7579Utils.sol"...
github/openzeppelin
draft-AccountERC7579Hooked
contracts/account/extensions/draft-AccountERC7579Hooked.sol
7,360
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) pragma solidity ^0.8.20; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Provides tracking nonces for addresses. Nonces will only increment. */ abstract contract NoncesUp...
github/openzeppelin-upgradeable
NoncesUpgradeable
contracts/utils/NoncesUpgradeable.sol
2,346
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {IPoolManager} from "../interfaces/IPoolManager.sol"; import {Currency} from "../types/Currency.sol"; import {CurrencyReserves} from "./CurrencyReserves.sol"; import {NonzeroDeltaCount} from "./NonzeroDeltaCount.sol"; import {Lock} from "./Lock.sol"; ///...
github/uniswap-v4-core
TransientStateLibrary
src/libraries/TransientStateLibrary.sol
2,361
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.24; import {Currency} from "../types/Currency.sol"; /// @title a library to store callers' currency deltas in transient storage /// @dev this library implements the equivalent of a mapping, as transient storage can only be accessed in assembly library Currency...
github/uniswap-v4-core
CurrencyDelta
src/libraries/CurrencyDelta.sol
1,606
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol"; import {PoolId} from "@uniswap/v4-core/src/types/PoolId.sol"; /** * @dev PositionInfo is a packed version of solidity structure. * Using the packaged version saves gas and memory by not storing t...
github/uniswap-v4-periphery
PositionInfoLibrary
src/libraries/PositionInfoLibrary.sol
3,917
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; import {IMetaMorpho} from "./interfaces/IMetaMorpho.sol"; import {IMetaMorphoFactory} from "./interfaces/IMetaMorphoFactory.sol"; import {EventsLib} from "./libraries/EventsLib.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; import {Meta...
github/morpho-metamorpho
MetaMorphoFactory
src/MetaMorphoFactory.sol
1,719
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin-upgrades/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; contract BackingEigen is OwnableUp...
github/eigenlayer
BackingEigen
src/contracts/token/BackingEigen.sol
6,710
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {BN254} from "./BN254.sol"; /// @title BN254SignatureVerifier /// @notice Library for BN254 signature verification /// @dev Provides unified signature verification with consistent gamma calculation and hash-to-G1 conversion library BN254SignatureVer...
github/eigenlayer
BN254SignatureVerifier
src/contracts/libraries/BN254SignatureVerifier.sol
3,137
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; using OperatorSetLib for OperatorSet global; /// @notice An operator set identified by the AVS address and an identifier /// @param avs The address of the AVS this operator set belongs to /// @param id The unique identifier for the operator set struct Oper...
github/eigenlayer
OperatorSetLib
src/contracts/libraries/OperatorSetLib.sol
845
// SPDX-License-Identifier: MIT // several functions are taken or adapted from https://github.com/HarryR/solcrypto/blob/master/contracts/altbn128.sol (MIT license): // Copyright 2017 Christian Reitwiessner // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated...
github/eigenlayer
BN254
src/contracts/libraries/BN254.sol
13,566
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "../interfaces/IPauserRegistry.sol"; /// @title Defines pauser & unpauser roles + modifiers to be used elsewhere. /// @author Layr Labs, Inc. /// @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service contract PauserRegistry...
github/eigenlayer
PauserRegistry
src/contracts/permissions/PauserRegistry.sol
2,178
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; import "./StrategyFactoryStorage.sol"; import "./StrategyBase.sol"; import "./DurationVaultStrategy.sol"; import "../inte...
github/eigenlayer
StrategyFactory
src/contracts/strategies/StrategyFactory.sol
7,441
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "../../src/contracts/multichain/CrossChainRegistry.sol"; /** * @title CrossChainRegistryWrapper * @notice Exposes internal checkCanCall logic as an external function */ contract CrossChainRegistryHarness is CrossChainRegistry { /** * @...
github/eigenlayer
CrossChainRegistryHarness
certora/harnesses/CrossChainRegistryHarness.sol
1,454
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IServiceManagerUI} from "./interfaces/IServiceManagerUI.sol"; /** * @title Contract that proxies calls to a ServiceManager contract. * This contract is designed to be used by off-chain services which need * errors to be handled gracefully. * @a...
github/eigenlayer-middleware
ServiceManagerRouter
src/ServiceManagerRouter.sol
2,283
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IPermissionController} from "eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol"; import {IKeyRegistrar} from "eige...
github/eigenlayer-middleware
TaskAVSRegistrarBase
src/avs/task/TaskAVSRegistrarBase.sol
5,382
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import { IAllocationManager, OperatorSet } from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IStrategyManager} from "eigenlayer-contracts/src/contracts/interfaces/IStrategyManager.sol"; import {SlasherBase} from "....
github/eigenlayer-middleware
VetoableSlasher
src/slashers/VetoableSlasher.sol
5,437
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {SlasherStorage, ISlashingRegistryCoordinator} from "./SlasherStorage.sol"; import { OperatorSet, IAllocationManager } from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IStrategyManager} from "eigenlayer-con...
github/eigenlayer-middleware
SlasherBase
src/slashers/base/SlasherBase.sol
3,380
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol"; import {IAVSRegistrarInternal} from "../../interfaces/IAVSRegistrarInternal.sol"; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfa...
github/eigenlayer-middleware
AVSRegistrar
src/middlewareV2/registrar/AVSRegistrar.sol
5,222
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {ISocketRegistryV2} from "../../../interfaces/ISocketRegistryV2.sol"; import {SocketRegistryStorage} from "./SocketRegistryStorage.sol"; import { OperatorSetLib, OperatorSet } from "eigenlayer-contracts/src/contracts/libraries/OperatorSetLib....
github/eigenlayer-middleware
SocketRegistry
src/middlewareV2/registrar/modules/SocketRegistry.sol
1,846
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {Initializable} from "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol"; import {IAllocationManager} from "eigenlayer-contracts/src/cont...
github/eigenlayer-middleware
AVSRegistrarAsIdentifier
src/middlewareV2/registrar/presets/AVSRegistrarAsIdentifier.sol
2,193
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {OperatorSet} from "eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IStrategy} from "eigenlayer-contracts/src/contr...
github/eigenlayer-middleware
ECDSATableCalculator
src/middlewareV2/tableCalculator/ECDSATableCalculator.sol
4,839
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {OperatorSet} from "eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; import {IOperatorTableCalculator} from "eigenlayer-contracts/src/contracts/interfaces/IOperatorTableCalculator.sol"; import {IKeyRegistrar} from "eigenlayer-con...
github/eigenlayer-middleware
ECDSATableCalculatorBase
src/middlewareV2/tableCalculator/ECDSATableCalculatorBase.sol
6,045
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {OperatorSet} from "eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IStrategy} from "eigenlayer-contracts/src/contr...
github/eigenlayer-middleware
BN254TableCalculator
src/middlewareV2/tableCalculator/BN254TableCalculator.sol
4,838
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {OperatorSet} from "eigenlayer-contracts/src/contracts/libraries/OperatorSetLib.sol"; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; import {IStrategy} from "eigenlayer-contracts/src/contr...
github/eigenlayer-middleware
BN254TableCalculatorWithCaps
src/middlewareV2/tableCalculator/unaudited/BN254TableCalculatorWithCaps.sol
6,757
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; /** * @title Library for Bitmap utilities such as converting between an array of bytes and a bitmap and finding the number of 1s in a bitmap. * @author Layr Labs, Inc. */ library BitmapUtils { /// @dev Thrown when the input byte array is too long to be c...
github/eigenlayer-middleware
BitmapUtils
src/libraries/BitmapUtils.sol
9,445
// SPDX-License-Identifier: MIT // several functions are taken or adapted from https://github.com/HarryR/solcrypto/blob/master/contracts/altbn128.sol (MIT license): // Copyright 2017 Christian Reitwiessner // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated...
github/eigenlayer-middleware
BN254
src/libraries/BN254.sol
13,406
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; import {IDelegationManager} from "eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; import {CheckpointsUpgradeable} from "@openzeppelin-upgrades/contracts/utils/CheckpointsUpgradeable.sol"; import { IECDSAStakeRegistry, IECDSASta...
github/eigenlayer-middleware
ECDSAStakeRegistryStorage
src/unaudited/ECDSAStakeRegistryStorage.sol
2,362
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; /** * @title WeightCapUtils * @notice Utility library for applying weight caps to operator weights */ library WeightCapUtils { /** * @notice Apply single weight cap to operator weights (backwards compatibility) * @param operators Array of o...
github/eigenlayer-middleware
WeightCapUtils
src/unaudited/libraries/WeightCapUtils.sol
4,664
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; import {ECDSAStakeRegistryPermissioned} from "./ECDSAStakeRegistryPermissioned.sol"; import {IDelegationManager} from "eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; import {CheckpointsUpgradeable} from "@openzeppelin-upgrades/con...
github/eigenlayer-middleware
ECDSAStakeRegistryEqualWeight
src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol
2,053
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; interface ISocketRegistryEvents { /// @notice Emitted when an operator socket is set event OperatorSocketSet(address indexed operator, string socket); } interface ISocketRegistryV2 is ISocketRegistryEvents { /** * @notice Gets the socket f...
github/eigenlayer-middleware
ISocketRegistryV2
src/interfaces/ISocketRegistryV2.sol
1,035
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import { Consideration } from "seaport-core/src/lib/Consideration.sol"; /** * @title Seaport * @custom:version 1.6 * @author 0age (0age.eth) * @custom:coauthor d1ll0n (d1ll0n.eth) * @custom:coauthor transmissions11 (t11s.eth) * @custom:coauthor James Wenze...
github/seaport
Seaport
contracts/Seaport.sol
5,029
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { Pausable } from "@openzeppelin/contracts/security/Pausable.sol"; import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; imp...
github/layerzero-v2
Worker
packages/layerzero-v2/evm/messagelib/contracts/Worker.sol
6,449
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Transfer } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/Transfer.sol"; import { ILayerZeroExecutor } from "./interfaces/ILayerZeroExecutor.sol"; import { ILayerZeroTr...
github/layerzero-v2
SendLibBase
packages/layerzero-v2/evm/messagelib/contracts/SendLibBase.sol
10,512
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import { Initializable } from "@...
github/layerzero-v2
WorkerUpgradeable
packages/layerzero-v2/evm/messagelib/contracts/upgradeable/WorkerUpgradeable.sol
7,384
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { IRouterClient } from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol"; import { IAny2EVMMessageReceiver } from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol"; import { Client } from "@chainli...
github/layerzero-v2
CCIPDVNAdapter
packages/layerzero-v2/evm/messagelib/contracts/uln/dvn/adapters/CCIP/CCIPDVNAdapter.sol
6,505
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { ERC165, IERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import { ILayerZeroEndpointV2, MessagingFee, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import { IMessageLib, M...
github/layerzero-v2
ReadLib1002
packages/layerzero-v2/evm/messagelib/contracts/uln/readlib/ReadLib1002.sol
21,782
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { ExecutorOptions } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/ExecutorOptions.sol"; import { DVNOptions } from "./DVNOptions.sol"; library UlnOpti...
github/layerzero-v2
UlnOptions
packages/layerzero-v2/evm/messagelib/contracts/uln/libs/UlnOptions.sol
8,483
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "./interfaces/ILayerZeroEndpointV2.sol"; enum ExecutionState { NotExecutable, // executor: waits for PayloadVerified event and starts polling fo...
github/layerzero-v2
EndpointV2ViewUpgradeable
packages/layerzero-v2/evm/protocol/contracts/EndpointV2ViewUpgradeable.sol
3,441
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IPreCrime } from "./interfaces/IPreCrime.sol"; import { IOAppPreCrimeSimulator, InboundPacket, Origin } from "./interfaces/IOAppPreCrimeSimulator.sol"; /** * @title OAppPreCrimeSim...
github/layerzero-v2
OAppPreCrimeSimulator
packages/layerzero-v2/evm/oapp/contracts/precrime/OAppPreCrimeSimulator.sol
5,355
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; /** * @title InboundPacket * @dev Structu...
github/layerzero-v2
Packet
packages/layerzero-v2/evm/oapp/contracts/precrime/libs/Packet.sol
2,470
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IOAppCore, ILayerZeroEndpointV2 } from "./interfaces/IOAppCore.sol"; /** * @title OAppCore * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurat...
github/layerzero-v2
OAppCore
packages/layerzero-v2/evm/oapp/contracts/oapp/OAppCore.sol
3,360
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // @dev Import the 'MessagingFee' and 'MessagingReceipt' so it's exposed to OApp implementers // solhint-disable-next-line no-unused-import import { OAppSender, MessagingFee, MessagingReceipt } from "./OAppSender.sol"; // @dev Import the 'Origin' so it's expose...
github/layerzero-v2
OApp
packages/layerzero-v2/evm/oapp/contracts/oapp/OApp.sol
1,525
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IOAppOptionsType3, EnforcedOptionParam } from "../interfaces/IOAppOptionsType3.sol"; /** * @title OAppOptionsType3 * @dev Abstract contract implementing the IOAppOptionsType3 inte...
github/layerzero-v2
OAppOptionsType3
packages/layerzero-v2/evm/oapp/contracts/oapp/libs/OAppOptionsType3.sol
4,898
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { ILayerZeroReceiver, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol"; interface IOAppReceiver is ILayerZeroReceiver { /** * @notice Indicates whether an address is an approved composeMsg sender to t...
github/layerzero-v2
IOAppReceiver
packages/layerzero-v2/evm/oapp/contracts/oapp/interfaces/IOAppReceiver.sol
1,076
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { IERC20Metadata, IERC20 } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { IOFT, OFTCore } from "./OFTCore.sol"; /** * @title OFTAda...
github/layerzero-v2
OFTAdapter
packages/layerzero-v2/evm/oapp/contracts/oft/OFTAdapter.sol
4,862
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { IOFT, OFTCore } from "./OFTCore.sol"; /** * @title OFT Contract * @dev OFT is an ERC-20 token that extends the functionality of the OFTCore contract. */ abstract contract OFT is...
github/layerzero-v2
OFT
packages/layerzero-v2/evm/oapp/contracts/oft/OFT.sol
3,404
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library OFTMsgCodec { // Offset constants for encoding and decoding OFT messages uint8 private constant SEND_TO_OFFSET = 32; uint8 private constant SEND_AMOUNT_SD_OFFSET = 40; /** * @dev Encodes an OFT LayerZero message. * @param _sen...
github/layerzero-v2
OFTMsgCodec
packages/layerzero-v2/evm/oapp/contracts/oft/libs/OFTMsgCodec.sol
2,906
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library OFTComposeMsgCodec { // Offset constants for decoding composed messages uint8 private constant NONCE_OFFSET = 8; uint8 private constant SRC_EID_OFFSET = 12; uint8 private constant AMOUNT_LD_OFFSET = 44; uint8 private constant COMPOSE...
github/layerzero-v2
OFTComposeMsgCodec
packages/layerzero-v2/evm/oapp/contracts/oft/libs/OFTComposeMsgCodec.sol
2,993
// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import { Script } from "forge-std/Script.sol"; import { console2 as console } from "forge-std/console2.sol"; import { PolicyEngineStaking } from "src/periphery/staking/PolicyEngineStaking.sol"; /// @title DeployPolicyEngineStaking /// @notice Script used to dep...
github/optimism-bedrock
DeployPolicyEngineStaking.s
packages/contracts-bedrock/scripts/deploy/DeployPolicyEngineStaking.s.sol
1,086
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (token/common/ERC2981.sol) pragma solidity ^0.8.20; import {IERC2981} from "../../interfaces/IERC2981.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a s...
github/openzeppelin
ERC2981
contracts/token/common/ERC2981.sol
5,323
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.24; import {ERC1155} from "../ERC1155.sol"; import {Arrays} from "../../../utils/Arrays.sol"; /** * @dev Extension of ERC-1155 that adds tracking of total supply per id. ...
github/openzeppelin
ERC1155Supply
contracts/token/ERC1155/extensions/ERC1155Supply.sol
3,153
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909TokenSupply.sol) pragma solidity ^0.8.20; import {ERC6909} from "../ERC6909.sol"; import {IERC6909TokenSupply} from "../../../interfaces/IERC6909.sol"; import {IERC165} from "../../../utils/introspection/I...
github/openzeppelin
ERC6909TokenSupply
contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol
1,565
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/extensions/draft-ERC20TemporaryApproval.sol) pragma solidity ^0.8.24; import {IERC20, ERC20} from "../ERC20.sol"; import {IERC7674} from "../../../interfaces/draft-IERC7674.sol"; import {Math} from "../../../utils/math/Math.s...
github/openzeppelin
draft-ERC20TemporaryApproval
contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol
5,125
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC20Capped.sol) pragma solidity ^0.8.20; import {ERC20} from "../ERC20.sol"; /** * @dev Extension of {ERC20} that adds a cap to the supply of tokens. */ abstract contract ERC20Capped is ERC20 { uint256 priv...
github/openzeppelin
ERC20Capped
contracts/token/ERC20/extensions/ERC20Capped.sol
1,410
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20Wrapper.sol) pragma solidity ^0.8.20; import {IERC20, IERC20Metadata, ERC20} from "../ERC20.sol"; import {SafeERC20} from "../utils/SafeERC20.sol"; import {Math} from "../../../utils/math/Math.sol"; /** * @d...
github/openzeppelin
ERC20Wrapper
contracts/token/ERC20/extensions/ERC20Wrapper.sol
3,870
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.24; import {ERC20} from "../ERC20.sol"; import {Votes} from "../../../governance/utils/Votes.sol"; import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; /** * @d...
github/openzeppelin
ERC20Votes
contracts/token/ERC20/extensions/ERC20Votes.sol
3,606
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.24; import {IERC20Permit} from "./IERC20Permit.sol"; import {ERC20} from "../ERC20.sol"; import {ECDSA} from "../../../utils/cryptography/ECDSA.sol"; import {EIP712} from "../....
github/openzeppelin
ERC20Permit
contracts/token/ERC20/extensions/ERC20Permit.sol
2,721
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Wrapper.sol) pragma solidity ^0.8.24; import {IERC721, ERC721} from "../ERC721.sol"; import {IERC721Receiver} from "../IERC721Receiver.sol"; /** * @dev Extension of the ERC-721 token contract to support to...
github/openzeppelin
ERC721Wrapper
contracts/token/ERC721/extensions/ERC721Wrapper.sol
4,345
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Consecutive.sol) pragma solidity ^0.8.24; import {ERC721} from "../ERC721.sol"; import {IERC2309} from "../../../interfaces/IERC2309.sol"; import {BitMaps} from "../../../utils/structs/BitMaps.sol"; import {...
github/openzeppelin
ERC721Consecutive
contracts/token/ERC721/extensions/ERC721Consecutive.sol
7,405
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (crosschain/CrosschainLinked.sol) pragma solidity ^0.8.26; import {IERC7786GatewaySource} from "../interfaces/draft-IERC7786.sol"; import {InteroperableAddress} from "../utils/draft-InteroperableAddress.sol"; import {Bytes} from "../utils...
github/openzeppelin
CrosschainLinked
contracts/crosschain/CrosschainLinked.sol
4,455
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (crosschain/ERC7786Recipient.sol) pragma solidity ^0.8.20; import {IERC7786Recipient} from "../interfaces/draft-IERC7786.sol"; /** * @dev Base implementation of an ERC-7786 compliant cross-chain message receiver. * * This abstract con...
github/openzeppelin
ERC7786Recipient
contracts/crosschain/ERC7786Recipient.sol
2,907
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; import {IERC7786GatewaySource} from "../interfaces/draft-IERC7786.sol"; import {ERC7786Recipient} from "./ERC7786Recipient.sol"; import {ERC7579Utils, Mode, CallType, ExecType} from "../account/utils/draft-ERC7579Utils.sol"; import {Bytes} from "../utils/Bytes....
github/openzeppelin
CrosschainRemoteExecutor
contracts/crosschain/CrosschainRemoteExecutor.sol
4,040
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (finance/VestingWalletCliff.sol) pragma solidity ^0.8.20; import {SafeCast} from "../utils/math/SafeCast.sol"; import {VestingWallet} from "./VestingWallet.sol"; /** * @dev Extension of {VestingWallet} that adds a cliff to the vesting s...
github/openzeppelin
VestingWalletCliff
contracts/finance/VestingWalletCliff.sol
2,018
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusiv...
github/openzeppelin
Ownable
contracts/access/Ownable.sol
3,102
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {IERC6372} from "../interfaces/IERC6372.sol"; import {Time} from "./types/Time.sol"; /** * @dev Utility library for the ERC-6372 clock standard. */ library ERC6372Utils { /// @dev The clock was incorrectly modified. error ERC6372InconsistentCl...
github/openzeppelin
ERC6372Utils
contracts/utils/ERC6372Utils.sol
2,081