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: MIT // OpenZeppelin Contracts (last updated v5.5.0) (utils/Address.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; import {LowLevelCall} from "./LowLevelCall.sol"; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev ...
github/openzeppelin
Address
contracts/utils/Address.sol
6,803
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (utils/ShortStrings.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x ...
github/openzeppelin
ShortStrings
contracts/utils/ShortStrings.sol
4,310
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (utils/Create2.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; import {LowLevelCall} from "./LowLevelCall.sol"; /** * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. * `CREATE2` can be used to...
github/openzeppelin
Create2
contracts/utils/Create2.sol
4,240
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (utils/NoncesKeyed.sol) pragma solidity ^0.8.20; import {Nonces} from "./Nonces.sol"; /** * @dev Alternative to {Nonces}, that supports key-ed nonces. * * Follows the https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-suppor...
github/openzeppelin
NoncesKeyed
contracts/utils/NoncesKeyed.sol
3,264
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * ...
github/openzeppelin
Pausable
contracts/utils/Pausable.sol
2,706
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuardTransient.sol) pragma solidity ^0.8.24; import {TransientSlot} from "./TransientSlot.sol"; /** * @dev Variant of {ReentrancyGuard} that uses transient storage. * * NOTE: This variant only works on networks where ...
github/openzeppelin
ReentrancyGuardTransient
contracts/utils/ReentrancyGuardTransient.sol
2,848
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (utils/SlotDerivation.sol) // This file was procedurally generated from scripts/generate/templates/SlotDerivation.js. pragma solidity ^0.8.20; /** * @dev Library for computing storage (and transient storage) locations from namespaces and...
github/openzeppelin
SlotDerivation
contracts/utils/SlotDerivation.sol
5,317
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to av...
github/openzeppelin
Errors
contracts/utils/Errors.sol
896
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (utils/Blockhash.sol) pragma solidity ^0.8.20; /** * @dev Library for accessing historical block hashes beyond the standard 256 block limit. * Uses EIP-2935's history storage contract which maintains a ring buffer of the last * 8191 bl...
github/openzeppelin
Blockhash
contracts/utils/Blockhash.sol
2,218
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonR...
github/openzeppelin
ReentrancyGuard
contracts/utils/ReentrancyGuard.sol
4,766
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (utils/structs/CircularBuffer.sol) pragma solidity ^0.8.24; import {Math} from "../math/Math.sol"; import {Arrays} from "../Arrays.sol"; import {Panic} from "../Panic.sol"; /** * @dev A fixed-size buffer for keeping `bytes32` items in s...
github/openzeppelin
CircularBuffer
contracts/utils/structs/CircularBuffer.sol
5,519
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/P256.sol) pragma solidity ^0.8.20; import {Math} from "../math/Math.sol"; import {Errors} from "../Errors.sol"; /** * @dev Implementation of secp256r1 verification and recovery functions. * * The secp256r1 curve (al...
github/openzeppelin
P256
contracts/utils/cryptography/P256.sol
19,096
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerP256.sol) pragma solidity ^0.8.20; import {AbstractSigner} from "./AbstractSigner.sol"; import {P256} from "../P256.sol"; /** * @dev Implementation of {AbstractSigner} using xref:api:utils/cryptography#...
github/openzeppelin
SignerP256
contracts/utils/cryptography/signers/SignerP256.sol
2,147
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; import {SafeCast} from "./SafeCast.sol"; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Branchless ternary ev...
github/openzeppelin
SignedMath
contracts/utils/math/SignedMath.sol
2,613
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesSuperQuorumFraction.sol) pragma solidity ^0.8.24; import {Governor} from "../Governor.sol"; import {GovernorSuperQuorum} from "./GovernorSuperQuorum.sol"; import {GovernorVotesQuorumFraction} from "./Go...
github/openzeppelin
GovernorVotesSuperQuorumFraction
contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol
5,626
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorSequentialProposalId.sol) pragma solidity ^0.8.24; import {IGovernor, Governor} from "../Governor.sol"; /** * @dev Extension of {Governor} that changes the numbering of proposal ids from the default hash-b...
github/openzeppelin
GovernorSequentialProposalId
contracts/governance/extensions/GovernorSequentialProposalId.sol
2,823
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesQuorumFraction.sol) pragma solidity ^0.8.24; import {GovernorVotes} from "./GovernorVotes.sol"; import {Math} from "../../utils/math/Math.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; im...
github/openzeppelin
GovernorVotesQuorumFraction
contracts/governance/extensions/GovernorVotesQuorumFraction.sol
4,183
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (metatx/ERC2771Context.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Context variant with ERC-2771 support. See {_msgSender} for the calldata format. * * WARNING: Avoid using this pattern in co...
github/openzeppelin
ERC2771Context
contracts/metatx/ERC2771Context.sol
3,621
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (proxy/transparent/TransparentUpgradeableProxy.sol) pragma solidity ^0.8.22; import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; import {ERC1967Proxy} from "../ERC1967/ERC1967Proxy.sol"; import {IERC1967} from "../../interfaces/IERC...
github/openzeppelin
TransparentUpgradeableProxy
contracts/proxy/transparent/TransparentUpgradeableProxy.sol
6,547
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.22; import {IERC1822Proxiable} from "../../interfaces/draft-IERC1822.sol"; import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; /** * @dev An upgradeability mechanism designed ...
github/openzeppelin
UUPSUpgradeable
contracts/proxy/utils/UUPSUpgradeable.sol
6,323
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.21; import {IBeacon} from "../beacon/IBeacon.sol"; import {IERC1967} from "../../interfaces/IERC1967.sol"; import {Address} from "../../utils/Address.sol"; import {StorageSlot} from "....
github/openzeppelin
ERC1967Utils
contracts/proxy/ERC1967/ERC1967Utils.sol
6,260
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.22; import {Proxy} from "../Proxy.sol"; import {ERC1967Utils} from "./ERC1967Utils.sol"; /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are...
github/openzeppelin
ERC1967Proxy
contracts/proxy/ERC1967/ERC1967Proxy.sol
2,636
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/UpgradeableBeacon.sol) pragma solidity ^0.8.20; import {IBeacon} from "./IBeacon.sol"; import {Ownable} from "../../access/Ownable.sol"; /** * @dev This contract is used in conjunction with one or more instances of {Beacon...
github/openzeppelin
UpgradeableBeacon
contracts/proxy/beacon/UpgradeableBeacon.sol
2,219
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (account/Account.sol) pragma solidity ^0.8.20; import {PackedUserOperation, IAccount, IEntryPoint} from "../interfaces/draft-IERC4337.sol"; import {ERC4337Utils} from "./utils/draft-ERC4337Utils.sol"; import {AbstractSigner} from "../util...
github/openzeppelin
Account
contracts/account/Account.sol
5,555
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (account/extensions/draft-ERC7821.sol) pragma solidity ^0.8.20; import {ERC7579Utils, Mode, CallType, ExecType, ModeSelector} from "../utils/draft-ERC7579Utils.sol"; import {IERC7821} from "../../interfaces/draft-IERC7821.sol"; import {Ac...
github/openzeppelin
draft-ERC7821
contracts/account/extensions/draft-ERC7821.sol
2,689
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (token/common/ERC2981.sol) pragma solidity ^0.8.20; import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {ERC165Upgradeable} from...
github/openzeppelin-upgradeable
ERC2981Upgradeable
contracts/token/common/ERC2981Upgradeable.sol
6,501
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.24; import {ERC1155Upgradeable} from "../ERC1155Upgradeable.sol"; import {Arrays} from "@openzeppelin/contracts/utils/Arrays.sol"; import {Initializable} from "@openzeppeli...
github/openzeppelin-upgradeable
ERC1155SupplyUpgradeable
contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol
4,230
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909TokenSupply.sol) pragma solidity ^0.8.20; import {ERC6909Upgradeable} from "../ERC6909Upgradeable.sol"; import {IERC6909TokenSupply} from "@openzeppelin/contracts/interfaces/IERC6909.sol"; import {IERC165}...
github/openzeppelin-upgradeable
ERC6909TokenSupplyUpgradeable
contracts/token/ERC6909/extensions/ERC6909TokenSupplyUpgradeable.sol
2,651
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC20Capped.sol) pragma solidity ^0.8.20; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Extension of {ER...
github/openzeppelin-upgradeable
ERC20CappedUpgradeable
contracts/token/ERC20/extensions/ERC20CappedUpgradeable.sol
2,393
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/extensions/draft-ERC20TemporaryApproval.sol) pragma solidity ^0.8.24; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {IERC7674} from "@o...
github/openzeppelin-upgradeable
draft-ERC20TemporaryApprovalUpgradeable
contracts/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol
5,572
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20Wrapper.sol) pragma solidity ^0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; im...
github/openzeppelin-upgradeable
ERC20WrapperUpgradeable
contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol
5,346
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.24; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {VotesUpgradeable} from "../../../governance/utils/VotesUpgradeable.sol"; import {Checkpoints} from "@openze...
github/openzeppelin-upgradeable
ERC20VotesUpgradeable
contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol
3,943
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.24; import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {ECDSA} from ...
github/openzeppelin-upgradeable
ERC20PermitUpgradeable
contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol
3,162
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Wrapper.sol) pragma solidity ^0.8.24; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; import {IERC721Receiver} from "@ope...
github/openzeppelin-upgradeable
ERC721WrapperUpgradeable
contracts/token/ERC721/extensions/ERC721WrapperUpgradeable.sol
5,466
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.24; import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; import {IERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; i...
github/openzeppelin-upgradeable
ERC721EnumerableUpgradeable
contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol
8,771
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; import {IERC7786GatewaySource} from "@openzeppelin/contracts/interfaces/draft-IERC7786.sol"; import {ERC7786Recipient} from "@openzeppelin/contracts/crosschain/ERC7786Recipient.sol"; import {ERC7579Utils, Mode, CallType, ExecType} from "@openzeppelin/contracts/...
github/openzeppelin-upgradeable
CrosschainRemoteExecutorUpgradeable
contracts/crosschain/CrosschainRemoteExecutorUpgradeable.sol
5,437
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (crosschain/CrosschainLinked.sol) pragma solidity ^0.8.26; import {IERC7786GatewaySource} from "@openzeppelin/contracts/interfaces/draft-IERC7786.sol"; import {InteroperableAddress} from "@openzeppelin/contracts/utils/draft-InteroperableA...
github/openzeppelin-upgradeable
CrosschainLinkedUpgradeable
contracts/crosschain/CrosschainLinkedUpgradeable.sol
5,580
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (finance/VestingWalletCliff.sol) pragma solidity ^0.8.20; import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import {VestingWalletUpgradeable} from "./VestingWalletUpgradeable.sol"; import {Initializable} from "@ope...
github/openzeppelin-upgradeable
VestingWalletCliffUpgradeable
contracts/finance/VestingWalletCliffUpgradeable.sol
3,124
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Contract module which prov...
github/openzeppelin-upgradeable
OwnableUpgradeable
contracts/access/OwnableUpgradeable.sol
4,046
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Contract module which allo...
github/openzeppelin-upgradeable
PausableUpgradeable
contracts/utils/PausableUpgradeable.sol
3,680
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (utils/NoncesKeyed.sol) pragma solidity ^0.8.20; import {NoncesUpgradeable} from "./NoncesUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Alternative to {Nonces}, that sup...
github/openzeppelin-upgradeable
NoncesKeyedUpgradeable
contracts/utils/NoncesKeyedUpgradeable.sol
4,216
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerP256.sol) pragma solidity ^0.8.20; import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol"; import {P256} from "@openzeppelin/contracts/utils/cryptography/P256...
github/openzeppelin-upgradeable
SignerP256Upgradeable
contracts/utils/cryptography/signers/SignerP256Upgradeable.sol
3,183
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesQuorumFraction.sol) pragma solidity ^0.8.24; import {GovernorVotesUpgradeable} from "./GovernorVotesUpgradeable.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {SafeCast} ...
github/openzeppelin-upgradeable
GovernorVotesQuorumFractionUpgradeable
contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol
5,574
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorSequentialProposalId.sol) pragma solidity ^0.8.24; import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; import {Initiali...
github/openzeppelin-upgradeable
GovernorSequentialProposalIdUpgradeable
contracts/governance/extensions/GovernorSequentialProposalIdUpgradeable.sol
4,265
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesSuperQuorumFraction.sol) pragma solidity ^0.8.24; import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; import {GovernorSuperQuorumUpgradeable} from "./GovernorSuperQuorumUpgradeable.sol"; imp...
github/openzeppelin-upgradeable
GovernorVotesSuperQuorumFractionUpgradeable
contracts/governance/extensions/GovernorVotesSuperQuorumFractionUpgradeable.sol
7,306
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.6.0) (metatx/ERC2771Context.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Context variant wit...
github/openzeppelin-upgradeable
ERC2771ContextUpgradeable
contracts/metatx/ERC2771ContextUpgradeable.sol
3,765
// SPDX-License-Identifier: MIT pragma solidity 0.8.26; import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol"; import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol"; import {Currency, CurrencyLibrary} from "@uniswap/v4-core/src/types/Currency.sol"; import {BalanceDelta} from "@uniswap/...
github/uniswap-v4-periphery
PositionManager
src/PositionManager.sol
28,921
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {Locker} from "../libraries/Locker.sol"; /// @notice A transient reentrancy lock, that stores the caller's address as the lock contract ReentrancyLock { error ContractLocked(); modifier isNotLocked() { if (Locker.get() != address(0)) rev...
github/uniswap-v4-periphery
ReentrancyLock
src/base/ReentrancyLock.sol
521
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {Currency} from "@uniswap/v4-core/src/types/Currency.sol"; import {TransientStateLibrary} from "@uniswap/v4-core/src/libraries/TransientStateLibrary.sol"; import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol"; import {ImmutableStat...
github/uniswap-v4-periphery
DeltaResolver
src/base/DeltaResolver.sol
5,801
// SPDX-License-Identifier: MIT pragma solidity 0.8.26; /// @title IUniswapV4DeployerCompetition /// @notice Interface for the UniswapV4DeployerCompetition contract interface IUniswapV4DeployerCompetition { event NewAddressFound(address indexed bestAddress, address indexed submitter, uint256 score); error Inv...
github/uniswap-v4-periphery
IUniswapV4DeployerCompetition
src/interfaces/IUniswapV4DeployerCompetition.sol
1,240
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "./IPositionManager.sol"; import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol"; /// @title IPositionDescriptor /// @notice Interface for the PositionDescriptor contract interface IPositionDescriptor { error InvalidTokenId(uin...
github/uniswap-v4-periphery
IPositionDescriptor
src/interfaces/IPositionDescriptor.sol
2,006
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {ISignatureTransfer} from "./interfaces/ISignatureTransfer.sol"; import {SignatureExpired, InvalidNonce} from "./PermitErrors.sol"; import {ERC20} from "solmate/src/tokens/ERC20.sol"; import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol"; i...
github/uniswap-permit2
SignatureTransfer
src/SignatureTransfer.sol
6,546
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {MigratorImmutables} from '../modules/MigratorImmutables.sol'; import {INonfungiblePositionManager} from '@uniswap/v3-periphery/contracts/interfaces/INonfungiblePositionManager.sol'; import {Actions} from '@uniswap/v4-periphery/src/libraries/...
github/uniswap-universal-router
V3ToV4Migrator
contracts/modules/V3ToV4Migrator.sol
4,625
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {IAllowanceTransfer} from 'permit2/src/interfaces/IAllowanceTransfer.sol'; import {SafeCast160} from 'permit2/src/libraries/SafeCast160.sol'; import {Payments} from './Payments.sol'; /// @title Payments through Permit2 /// @notice Performs i...
github/uniswap-universal-router
Permit2Payments
contracts/modules/Permit2Payments.sol
2,058
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {V3Path} from './V3Path.sol'; import {BytesLib} from './BytesLib.sol'; import {SafeCast} from '@uniswap/v3-core/contracts/libraries/SafeCast.sol'; import {IUniswapV3Pool} from '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import...
github/uniswap-universal-router
V3SwapRouter
contracts/modules/uniswap/v3/V3SwapRouter.sol
11,615
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {V2SwapRouter} from '../modules/uniswap/v2/V2SwapRouter.sol'; import {V3SwapRouter} from '../modules/uniswap/v3/V3SwapRouter.sol'; import {V4SwapRouter} from '../modules/uniswap/v4/V4SwapRouter.sol'; import {BytesLib} from '../modules/uniswap...
github/uniswap-universal-router
Dispatcher
contracts/base/Dispatcher.sol
18,780
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {EIP712} from '@openzeppelin/contracts/utils/cryptography/EIP712.sol'; import {ECDSA} from '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; /// @title RouteSigner /// @notice Contract for managing signed execution context using transi...
github/uniswap-universal-router
RouteSigner
contracts/base/RouteSigner.sol
4,069
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; import {Locker} from '../libraries/Locker.sol'; /// @title Lock /// @notice A contract that provides a reentrancy lock for external calls contract Lock { /// @notice Thrown when attempting to reenter a locked function from an external caller ...
github/uniswap-universal-router
Lock
contracts/base/Lock.sol
1,069
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; struct AcrossV4DepositV3Params { address depositor; // credited depositor address recipient; // destination recipient address inputToken; // ERC20 on origin (WETH if bridging ETH) address outputToken; // ERC20 on destination (or 0x0)...
github/uniswap-universal-router
IUniversalRouter
contracts/interfaces/IUniversalRouter.sol
4,362
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.24; interface IUniversalRouter { /// @notice Thrown when a required command has failed error ExecutionFailed(uint256 commandIndex, bytes message); /// @notice Thrown when attempting to send ETH directly to the contract error ETHNotAccep...
github/uniswap-x
IUniversalRouter
src/external/IUniversalRouter.sol
1,172
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "./CometCore.sol"; /** * @title Compound's Comet Ext Interface * @notice An efficient monolithic money market protocol * @author Compound */ abstract contract CometExtInterface is CometCore { error BadAmount(); error BadNonce(); error...
github/compound-comet
CometExtInterface
contracts/CometExtInterface.sol
3,182
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "./vendor/proxy/transparent/ProxyAdmin.sol"; import "./marketupdates/MarketAdminPermissionCheckerInterface.sol"; interface Deployable { function deploy(address cometProxy) external returns (address); } contract CometProxyAdmin is ProxyAdmin { ...
github/compound-comet
CometProxyAdmin
contracts/CometProxyAdmin.sol
3,382
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IPriceFeed.sol"; /** * @title Multiplicative price feed * @notice A custom price feed that multiplies the prices from two price feeds and returns the result ...
github/compound-comet
MultiplicativePriceFeed
contracts/pricefeeds/MultiplicativePriceFeed.sol
3,644
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IPriceFeed.sol"; /** * @title Scaling price feed * @notice A custom price feed that scales up or down the price received from an underlying price feed and re...
github/compound-comet
ScalingPriceFeedWithCustomDescription
contracts/pricefeeds/ScalingPriceFeedWithCustomDescription.sol
3,419
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IPriceFeed.sol"; import "../IRateProvider.sol"; /** * @title Scaling price feed for rate based oracles * @notice A custom price feed that scales up or down t...
github/compound-comet
RateBasedScalingPriceFeed
contracts/pricefeeds/RateBasedScalingPriceFeed.sol
3,585
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IPriceFeed.sol"; /** * @title Reverse multiplicative price feed * @notice A custom price feed that multiplies the price from one price feed and the inverse p...
github/compound-comet
ReverseMultiplicativePriceFeed
contracts/pricefeeds/ReverseMultiplicativePriceFeed.sol
4,103
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IPriceFeed.sol"; /** * @title Scaling price feed * @notice A custom price feed that scales up or down the price received from an underlying price feed and re...
github/compound-comet
ScalingPriceFeed
contracts/pricefeeds/ScalingPriceFeed.sol
3,415
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/renzo/IBalancerRateProvider.sol"; import "../IPriceFeed.sol"; /** * @title ezETH Scaling price feed * @notice A custom price feed that scales up or down the price received from an underlying Renzo ezETH / ETH exchange rate price feed and...
github/compound-comet
EzETHExchangeRatePriceFeed
contracts/pricefeeds/EzETHExchangeRatePriceFeed.sol
3,764
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IPriceFeed.sol"; /** * @title WBTC price feed * @notice A custom price feed that calculates the price for WBTC / USD * @author Compound */ contract WBTCPri...
github/compound-comet
WBTCPriceFeed
contracts/pricefeeds/WBTCPriceFeed.sol
3,547
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../vendor/kelp/ILRTOracle.sol"; import "../IPriceFeed.sol"; /** * @title Scaling price feed for rsETH * @notice A custom price feed that scales up or down the p...
github/compound-comet
RsETHScalingPriceFeed
contracts/pricefeeds/RsETHScalingPriceFeed.sol
3,588
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IERC4626.sol"; import "../IPriceFeed.sol"; /** * @title Price feed for ERC4626 assets * @notice A custom price feed that calculates the price for an ERC4626 ...
github/compound-comet
PriceFeedWith4626Support
contracts/pricefeeds/PriceFeedWith4626Support.sol
3,919
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../vendor/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "../IPriceFeed.sol"; import "../IWstETH.sol"; /** * @title wstETH price feed * @notice A custom price feed that calculates the price for wstETH / ETH * @author ...
github/compound-comet
WstETHPriceFeed
contracts/pricefeeds/WstETHPriceFeed.sol
3,297
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "./BaseBulker.sol"; import "../IWstETH.sol"; /** * @title Compound's Bulker contract for Ethereum mainnet * @notice Executes multiple Comet-related actions in a single transaction * @author Compound */ contract MainnetBulkerWithWstETHSupport is B...
github/compound-comet
MainnetBulkerWithWstETHSupport
contracts/bulkers/MainnetBulkerWithWstETHSupport.sol
4,554
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "./BaseBulker.sol"; import "../IWstETH.sol"; /** * @title Compound's Bulker contract for Ethereum mainnet * @notice Executes multiple Comet-related actions in a single transaction * @author Compound */ contract MainnetBulker is BaseBulker { /...
github/compound-comet
MainnetBulker
contracts/bulkers/MainnetBulker.sol
3,698
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../ITimelock.sol"; contract BaseBridgeReceiver { /** Custom errors **/ error AlreadyInitialized(); error BadData(); error InvalidProposalId(); error InvalidTimelockAdmin(); error ProposalNotExecutable(); error Transaction...
github/compound-comet
BaseBridgeReceiver
contracts/bridges/BaseBridgeReceiver.sol
5,477
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../IERC20NonStandard.sol"; import "./BaseBridgeReceiver.sol"; contract SweepableBridgeReceiver is BaseBridgeReceiver { error FailedToSendNativeToken(); error TransferOutFailed(); /** * @notice A public function to sweep accidental ...
github/compound-comet
SweepableBridgeReceiver
contracts/bridges/SweepableBridgeReceiver.sol
2,664
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "./IFxMessageProcessor.sol"; import "../BaseBridgeReceiver.sol"; contract PolygonBridgeReceiver is IFxMessageProcessor, BaseBridgeReceiver { error InvalidChild(); event NewFxChild(address indexed oldFxChild, address indexed newFxChild); ...
github/compound-comet
PolygonBridgeReceiver
contracts/bridges/polygon/PolygonBridgeReceiver.sol
1,545
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "../SweepableBridgeReceiver.sol"; import "./IScrollMessenger.sol"; /// @title Scroll Bridge Receiver /// @notice Contract that processes messages passed from Compound governance using the Scroll bridge contract ScrollBridgeReceiver is SweepableBridge...
github/compound-comet
ScrollBridgeReceiver
contracts/bridges/scroll/ScrollBridgeReceiver.sol
1,504
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; /** * @dev Interface for interacting with MarketAdminPermissionChecker */ interface MarketAdminPermissionCheckerInterface { /// @notice Error which represents that the caller passed is not market admin error Unauthorized(); /// @notice Error ...
github/compound-comet
MarketAdminPermissionCheckerInterface
contracts/marketupdates/MarketAdminPermissionCheckerInterface.sol
801
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; import "@openzeppelin-upgrades/contracts/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contra...
github/eigenlayer
StrategyManager
src/contracts/core/StrategyManager.sol
23,634
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; interface IProtocolRegistryErrors { /// @notice Thrown when array lengths don't match in ship(). error ArrayLengthMismatch(); /// @notice Thrown when a zero address is provided. error InputAddressZero(); /// @notice Thrown when trying ...
github/eigenlayer
IProtocolRegistry
src/contracts/interfaces/IProtocolRegistry.sol
5,915
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "../libraries/OperatorSetLib.sol"; interface IReleaseManagerErrors { /// @notice Thrown when a metadata URI must be published before publishing a release. error MustPublishMetadataURI(); /// @notice Thrown when the upgrade by time is in...
github/eigenlayer
IReleaseManager
src/contracts/interfaces/IReleaseManager.sol
5,169
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IStrategy.sol"; import "./IDurationVaultStrategy.sol"; import "./ISemVerMixin.sol"; /// @title Interface for the `StrategyFactory`...
github/eigenlayer
IStrategyFactory
src/contracts/interfaces/IStrategyFactory.sol
4,066
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import "src/contracts/interfaces/IAVSRegistrar.sol"; /// @notice Minimal AVS registrar for E2E testing. /// @dev AllocationManager will call `registerOperator`/`deregisterOperator` during operator set /// registration/deregistration. This registrar simply ...
github/eigenlayer
MockAVSRegistrar
script/operations/e2e/MockAVSRegistrar.sol
1,878
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {ISlashingRegistryCoordinator} from "./interfaces/ISlashingRegistryCoordinator.sol"; import {IBLSApkRegistry} from "./interfaces/IBLSApkRegistry.sol"; import {IStakeRegistry} from "./interfaces/IStakeRegistry.sol"; import {IIndexRegistry} from "./int...
github/eigenlayer-middleware
OperatorStateRetriever
src/OperatorStateRetriever.sol
12,058
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.20; import {BN254} from "../libraries/BN254.sol"; import {StorageSlot} from "@openzeppelin/contracts/utils/StorageSlot.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; // The following libraries (Comparators, Arrays and SlotDerivation) a...
github/eigenlayer-middleware
BLSSigCheckUtils
src/unaudited/BLSSigCheckUtils.sol
27,710
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IBLSApkRegistry} from "../interfaces/IBLSApkRegistry.sol"; import {IBLSSignatureCheckerTypes} from "../interfaces/IBLSSignatureChecker.sol"; import {IIndexRegistry} from "../interfaces/IIndexRegistry.sol"; import {ISlashingRegistryCoordinator} from ...
github/eigenlayer-middleware
BLSSigCheckOperatorStateRetriever
src/unaudited/BLSSigCheckOperatorStateRetriever.sol
10,401
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; interface ISlasherErrors { /// @notice Thrown when a caller without slasher privileges attempts a restricted operation error OnlySlasher();...
github/eigenlayer-middleware
ISlasher
src/interfaces/ISlasher.sol
1,162
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {BN254} from "../libraries/BN254.sol"; interface IBLSApkRegistryErrors { /// @notice Thrown when a non-RegistryCoordinator owner address calls a restricted function. error OnlyRegistryCoordinatorOwner(); /// @notice Thrown when a non-Reg...
github/eigenlayer-middleware
IBLSApkRegistry
src/interfaces/IBLSApkRegistry.sol
13,194
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import { ISlashingRegistryCoordinator, ISlashingRegistryCoordinatorErrors, ISlashingRegistryCoordinatorEvents, ISlashingRegistryCoordinatorTypes } from "./ISlashingRegistryCoordinator.sol"; import {ISignatureUtilsMixinTypes} from "eigenl...
github/eigenlayer-middleware
IRegistryCoordinator
src/interfaces/IRegistryCoordinator.sol
8,092
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; import {IERC1271Upgradeable} from "@openzeppelin-upgrades/contracts/interfaces/IERC1271Upgradeable.sol"; import {IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; import {ISignatureUtilsMixinTypes} from "eigenlayer-contracts/...
github/eigenlayer-middleware
IECDSAStakeRegistry
src/interfaces/IECDSAStakeRegistry.sol
11,330
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IBLSApkRegistry} from "./IBLSApkRegistry.sol"; import {IStakeRegistry} from "./IStakeRegistry.sol"; import {IIndexRegistry} from "./IIndexRegistry.sol"; import {BN254} from "../libraries/BN254.sol"; import {IAllocationManager} from "eigenlayer-c...
github/eigenlayer-middleware
ISlashingRegistryCoordinator
src/interfaces/ISlashingRegistryCoordinator.sol
27,149
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; import {IDelegationManager} from "eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol"; import {IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol"; /// @notice Interface containing all error definitions for t...
github/eigenlayer-middleware
IStakeRegistry
src/interfaces/IStakeRegistry.sol
19,520
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; interface IAVSRegistrarErrors { /// @notice Thrown when a key is not registered error KeyNotRegistered(); /// @notice Thrown when the caller is not the allocation manager error NotAllocationManager(); } interface IAVSRegistrarEvents { /...
github/eigenlayer-middleware
IAVSRegistrarInternal
src/interfaces/IAVSRegistrarInternal.sol
773
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.17; import "../../../interfaces/IPChainlinkOracle.sol"; import "../PendleLpOracleLib.sol"; /** * @dev The round data returned from this contract will follow: * - There will be only one round (roundId=0) * - startedAt=0, updatedAt=block.timestamp */...
github/pendle
PendleChainlinkOracle
contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol
5,293
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @notice PausableZoneEventsAndErrors contains errors and events * related to zone interaction. */ interface PausableZoneEventsAndErrors { /** * @dev Emit an event whenever a zone is successfully paused. */ event Paused(); /...
github/seaport
PausableZoneEventsAndErrors
contracts/zones/interfaces/PausableZoneEventsAndErrors.sol
3,197
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import { OrderType } from "seaport-types/src/lib/ConsiderationEnums.sol"; import { Order, OrderComponents, OrderParameters, OrderStatus } from "seaport-types/src/lib/ConsiderationStructs.sol"; import { _revertConsiderationLengthNotEqualToTo...
github/seaport
ReadOnlyOrderValidator
contracts/helpers/order-validator/lib/ReadOnlyOrderValidator.sol
28,290
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { MerkleLib } from "./MerkleLib.sol"; error TokenIdNotFound(); struct HashAndIntTuple { uint256 num; bytes32 hash; } /** * @notice Helper library for calculating criteria resolver Merkle roots and * proofs from integer token ids. */ ...
github/seaport
CriteriaHelperLib
contracts/helpers/navigator/lib/CriteriaHelperLib.sol
5,376
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import { ItemType } from "seaport-types/src/lib/ConsiderationStructs.sol"; import { NavigatorOfferItem, NavigatorConsiderationItem } from "./SeaportNavigatorTypes.sol"; library HelperItemLib { error InvalidIdentifier(uint256 identifier, uint256[] c...
github/seaport
HelperItemLib
contracts/helpers/navigator/lib/HelperItemLib.sol
7,166
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @title ZoneInteractionErrors * @author 0age * @notice ZoneInteractionErrors contains errors related to zone interaction. */ interface ZoneInteractionErrors { /** * @dev Revert with an error when attempting to fill an order that specifies ...
github/seaport
ZoneInteractionErrors
contracts/interfaces/ZoneInteractionErrors.sol
1,134