Verified contractPartialBUSL-1.1
PlasmaVault
Address0xb0f56bb0bf13ee05fef8cd2d8df5ffdfcac7a74f
- Balance
0 ETH
- Transactions
2,965
- Compiler
solc 0.8.26
- Same code
8 more contracts
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- Yes, 100 runs
- EVM version
- cancun
- License
- BUSL-1.1
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 23,120,189
- Creation transaction
- 0x2a096b0297…1f29991e92
- Main copy (most transactions)
- 0xe47358ea…e68bd9b2
- Libraries
- contracts/vaults/PlasmaVault.sol:PlasmaVaultMarketsLib0x6333…30507c
65 files
The source code is large: one file is shown at a time. Choose a file in the list.
- contracts/vaults/PlasmaVault.solmain55.43 KB
- contracts/fuses/IFuseCommon.sol277 B
- contracts/handlers/pre_hooks/IPreHook.sol1.13 KB
- contracts/handlers/pre_hooks/PreHooksHandler.sol1.91 KB
- contracts/handlers/pre_hooks/PreHooksLib.sol7.69 KB
- contracts/interfaces/IIporFusionAccessManager.sol3.02 KB
- contracts/interfaces/IPlasmaVault.sol3.03 KB
- contracts/interfaces/IPlasmaVaultBase.sol2.97 KB
- contracts/interfaces/IPlasmaVaultGovernance.sol10.49 KB
- contracts/interfaces/IRewardsClaimManager.sol5.47 KB
- contracts/libraries/AssetDistributionProtectionLib.sol10.07 KB
- contracts/libraries/CallbackHandlerLib.sol6.91 KB
- contracts/libraries/FuseStorageLib.sol8.65 KB
- contracts/libraries/FusesLib.sol23.16 KB
- contracts/libraries/PlasmaVaultConfigLib.sol16.91 KB
- contracts/libraries/PlasmaVaultLib.sol40.3 KB
- contracts/libraries/PlasmaVaultStorageLib.sol46.18 KB
- contracts/libraries/Roles.sol6.39 KB
- contracts/libraries/errors/Errors.sol730 B
- contracts/libraries/math/IporMath.sol4.17 KB
- contracts/managers/access/AccessManagedUpgradeable.sol6.97 KB
- contracts/managers/access/IporFusionAccessManager.sol12.84 KB
- contracts/managers/access/IporFusionAccessManagerInitializationLib.sol3.49 KB
- contracts/managers/access/IporFusionAccessManagersStorageLib.sol5.45 KB
- contracts/managers/access/RedemptionDelayLib.sol3.23 KB
- contracts/managers/access/RoleExecutionTimelockLib.sol2.22 KB
- contracts/managers/context/ContextClient.sol3.69 KB
- contracts/managers/context/ContextClientStorageLib.sol4.78 KB
- contracts/managers/context/IContextClient.sol2.6 KB
- contracts/managers/fee/FeeAccount.sol1.95 KB
- contracts/managers/fee/FeeManager.sol30.37 KB
- contracts/managers/fee/FeeManagerFactory.sol3.43 KB
- contracts/managers/fee/FeeManagerStorageLib.sol12.23 KB
- contracts/managers/withdraw/WithdrawManager.sol14.95 KB
- contracts/managers/withdraw/WithdrawManagerStorageLib.sol12.58 KB
- contracts/price_oracle/IPriceOracleMiddleware.sol2.28 KB
- contracts/universal_reader/UniversalReader.sol3.32 KB
- contracts/vaults/PlasmaVaultGovernance.sol66.72 KB
- contracts/vaults/lib/PlasmaVaultFeesLib.sol2.48 KB
- contracts/vaults/lib/PlasmaVaultMarketsLib.sol7.81 KB
- node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol8.91 KB
- node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol12.47 KB
- node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol13.75 KB
- node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol1.19 KB
- node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol4.36 KB
- node_modules/@openzeppelin/contracts/access/manager/AccessManager.sol29.36 KB
- node_modules/@openzeppelin/contracts/access/manager/AuthorityUtils.sol1.23 KB
- node_modules/@openzeppelin/contracts/access/manager/IAccessManaged.sol1.11 KB
- node_modules/@openzeppelin/contracts/access/manager/IAccessManager.sol16.09 KB
- node_modules/@openzeppelin/contracts/access/manager/IAuthority.sol482 B
- node_modules/@openzeppelin/contracts/interfaces/IERC4626.sol12.18 KB
- node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol6.53 KB
- node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol11.14 KB
- node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol2.78 KB
- node_modules/@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol12.41 KB
- node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol683 B
- node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol3.8 KB
- node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol5.77 KB
- node_modules/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol995 B
- node_modules/@openzeppelin/contracts/utils/Address.sol6.26 KB
- node_modules/@openzeppelin/contracts/utils/Context.sol963 B
- node_modules/@openzeppelin/contracts/utils/Multicall.sol1.7 KB
- node_modules/@openzeppelin/contracts/utils/math/Math.sol15.12 KB
- node_modules/@openzeppelin/contracts/utils/math/SafeCast.sol34.69 KB
- node_modules/@openzeppelin/contracts/utils/types/Time.sol5.1 KB
contracts/handlers/pre_hooks/PreHooksHandler.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.26;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {PreHooksLib} from "./PreHooksLib.sol";
import {IPreHook} from "./IPreHook.sol";
/// @title PreHooksHandler
/// @notice Handles pre-execution hooks for Plasma Vault operations
/// @dev Abstract contract that manages the execution of pre-hooks in the vault system.
/// This handler is responsible for:
/// - Safely executing pre-hook logic through delegate calls
/// - Managing hook execution flow
/// - Ensuring proper hook validation
///
/// Security considerations:
/// - Uses delegate calls for hook execution
/// - Implements null address checks
/// - Maintains execution context safety
///
/// Integration notes:
/// - Contracts inheriting this handler must ensure proper access control
/// - Pre-hooks are optional and can be skipped if implementation is not set
abstract contract PreHooksHandler {
using Address for address;
/// @notice Executes pre-hooks for a given operation
/// @dev Internal function that runs the pre-hook logic through a delegate call.
/// The function:
/// - Retrieves the pre-hook implementation for the given selector
/// - Skips execution if no implementation is found (address(0))
/// - Executes the hook via delegate call to maintain vault's context
/// - Preserves the vault's storage context during execution
/// @param selector_ The function selector of the operation requiring pre-hook execution
function _runPreHook(bytes4 selector_) internal {
address implementation = PreHooksLib.getPreHookImplementation(selector_);
if (implementation == address(0)) {
return;
}
implementation.functionDelegateCall(abi.encodeWithSelector(IPreHook.run.selector, selector_));
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {
"contracts/vaults/PlasmaVault.sol": {
"PlasmaVaultMarketsLib": "0x6333f1f68cfb959b2245989df3f6e0ffaa30507c"
}
},
"optimizer": {
"runs": 100,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@uniswap/v3-core/=node_modules/@uniswap/v3-core/",
"eth-gas-reporter/=node_modules/eth-gas-reporter/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"foundry-random/=lib/foundry-random/src/",
"@ethereum-vault-connector/=node_modules/ethereum-vault-connector/",
"@pendle/core-v2/=node_modules/@pendle/core-v2/",
"@chainlink/=node_modules/@chainlink/",
"@eth-optimism/=node_modules/@eth-optimism/",
"@morpho-org/=node_modules/@morpho-org/",
"@prb/test/=lib/foundry-random/lib/prb-test/src/",
"@scroll-tech/=node_modules/@scroll-tech/",
"CramBit/=lib/foundry-random/lib/CramBit/",
"base64-sol/=node_modules/base64-sol/",
"crambit/=lib/foundry-random/lib/CramBit/src/",
"ethereum-vault-connector/=node_modules/ethereum-vault-connector/",
"foundry-random/=lib/foundry-random/src/",
"openzeppelin/=node_modules/ethereum-vault-connector/lib/openzeppelin-contracts/contracts/",
"prb-test/=lib/foundry-random/lib/prb-test/src/",
"solidity-bytes-utils/=lib/foundry-random/lib/solidity-bytes-utils/contracts/",
"src/=lib/foundry-random/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.