Verified contractExactBUSL-1.1
TesseractVaultDeployer
Address0x55073cdf0b0e42c8b807a265eadff69973274a8d
- Balance
0 ETH
- Transactions
7
- Compiler
solc 0.8.30
- Same code
2 more contracts
Details
- Compiler
- solc 0.8.30+commit.73712a01
- Language
- solidity
- Optimization
- Yes, 10,000,000 runs
- EVM version
- cancun
- License
- BUSL-1.1
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 24,748,752
- Creation transaction
- 0x0f6e31dc39…989d7b9cf4
- Main copy (most transactions)
- 0xe4d85722…ad942fd9
103 files
The source code is large: one file is shown at a time. Choose a file in the list.
- contracts/TesseractVaultDeployer.solmain14.54 KB
- contracts/interfaces/IFusionFactory.sol479 B
- contracts/interfaces/IWhitelisting.sol164 B
- lib/ipor-fusion/contracts/factory/AccessManagerFactory.sol3.08 KB
- lib/ipor-fusion/contracts/factory/ContextManagerFactory.sol2.51 KB
- lib/ipor-fusion/contracts/factory/PlasmaVaultFactory.sol2.27 KB
- lib/ipor-fusion/contracts/factory/PriceManagerFactory.sol3.23 KB
- lib/ipor-fusion/contracts/factory/RewardsManagerFactory.sol2.97 KB
- lib/ipor-fusion/contracts/factory/WithdrawManagerFactory.sol2.7 KB
- lib/ipor-fusion/contracts/factory/lib/FusionFactoryLogicLib.sol14.13 KB
- lib/ipor-fusion/contracts/factory/lib/FusionFactoryStorageLib.sol23.61 KB
- lib/ipor-fusion/contracts/fuses/IFuseCommon.sol277 B
- lib/ipor-fusion/contracts/handlers/pre_hooks/IPreHook.sol1.13 KB
- lib/ipor-fusion/contracts/handlers/pre_hooks/PreHooksHandler.sol1.91 KB
- lib/ipor-fusion/contracts/handlers/pre_hooks/PreHooksLib.sol7.69 KB
- lib/ipor-fusion/contracts/interfaces/IIporFusionAccessManager.sol3.02 KB
- lib/ipor-fusion/contracts/interfaces/IPlasmaVault.sol3.03 KB
- lib/ipor-fusion/contracts/interfaces/IPlasmaVaultBase.sol3.01 KB
- lib/ipor-fusion/contracts/interfaces/IPlasmaVaultGovernance.sol10.48 KB
- lib/ipor-fusion/contracts/interfaces/IPlasmaVaultVotesPlugin.sol2.43 KB
- lib/ipor-fusion/contracts/interfaces/IRewardsClaimManager.sol5.47 KB
- lib/ipor-fusion/contracts/libraries/AssetDistributionProtectionLib.sol10.07 KB
- lib/ipor-fusion/contracts/libraries/CallbackHandlerLib.sol7.48 KB
- lib/ipor-fusion/contracts/libraries/FuseStorageLib.sol15.88 KB
- lib/ipor-fusion/contracts/libraries/FusesLib.sol23.88 KB
- lib/ipor-fusion/contracts/libraries/IporFusionMarkets.sol13.65 KB
- lib/ipor-fusion/contracts/libraries/PlasmaVaultConfigLib.sol17.15 KB
- lib/ipor-fusion/contracts/libraries/PlasmaVaultLib.sol41.13 KB
- lib/ipor-fusion/contracts/libraries/PlasmaVaultStorageLib.sol49.77 KB
- lib/ipor-fusion/contracts/libraries/Roles.sol6.39 KB
- lib/ipor-fusion/contracts/libraries/errors/Errors.sol730 B
- lib/ipor-fusion/contracts/libraries/math/IporMath.sol5.12 KB
- lib/ipor-fusion/contracts/managers/access/AccessManagedUpgradeable.sol6.97 KB
- lib/ipor-fusion/contracts/managers/access/IporFusionAccessManager.sol14.27 KB
- lib/ipor-fusion/contracts/managers/access/IporFusionAccessManagerInitializationLib.sol3.49 KB
- lib/ipor-fusion/contracts/managers/access/IporFusionAccessManagersStorageLib.sol5.44 KB
- lib/ipor-fusion/contracts/managers/access/RedemptionDelayLib.sol3.23 KB
- lib/ipor-fusion/contracts/managers/access/RoleExecutionTimelockLib.sol2.22 KB
- lib/ipor-fusion/contracts/managers/context/ContextClient.sol3.69 KB
- lib/ipor-fusion/contracts/managers/context/ContextClientStorageLib.sol4.78 KB
- lib/ipor-fusion/contracts/managers/context/ContextManager.sol15.09 KB
- lib/ipor-fusion/contracts/managers/context/ContextManagerStorageLib.sol6.67 KB
- lib/ipor-fusion/contracts/managers/context/IContextClient.sol2.6 KB
- lib/ipor-fusion/contracts/managers/fee/FeeAccount.sol1.95 KB
- lib/ipor-fusion/contracts/managers/fee/FeeManager.sol35.03 KB
- lib/ipor-fusion/contracts/managers/fee/FeeManagerFactory.sol3.73 KB
- lib/ipor-fusion/contracts/managers/fee/FeeManagerStorageLib.sol14.25 KB
- lib/ipor-fusion/contracts/managers/price/PriceOracleMiddlewareManager.sol14.49 KB
- lib/ipor-fusion/contracts/managers/price/PriceOracleMiddlewareManagerLib.sol10.26 KB
- lib/ipor-fusion/contracts/managers/rewards/RewardsClaimManager.sol8.96 KB
- lib/ipor-fusion/contracts/managers/rewards/RewardsClaimManagersStorageLib.sol5.85 KB
- lib/ipor-fusion/contracts/managers/withdraw/WithdrawManager.sol16.96 KB
- lib/ipor-fusion/contracts/managers/withdraw/WithdrawManagerStorageLib.sol12.63 KB
- lib/ipor-fusion/contracts/price_oracle/IPriceOracleMiddleware.sol2.28 KB
- lib/ipor-fusion/contracts/price_oracle/price_feed/IPriceFeed.sol1.18 KB
- lib/ipor-fusion/contracts/universal_reader/UniversalReader.sol3.32 KB
- lib/ipor-fusion/contracts/vaults/PlasmaVault.sol63.99 KB
- lib/ipor-fusion/contracts/vaults/PlasmaVaultBase.sol9.96 KB
- lib/ipor-fusion/contracts/vaults/PlasmaVaultGovernance.sol66.73 KB
- lib/ipor-fusion/contracts/vaults/initializers/IporFusionAccessManagerInitializerLibV1.sol47.39 KB
- lib/ipor-fusion/contracts/vaults/lib/PlasmaVaultFeesLib.sol3.81 KB
- lib/ipor-fusion/contracts/vaults/lib/PlasmaVaultMarketsLib.sol10.41 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/ERC20PermitUpgradeable.sol3.2 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/NoncesUpgradeable.sol2.33 KB
- node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol4.36 KB
- node_modules/@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol8.69 KB
- node_modules/@openzeppelin/contracts/access/Ownable.sol3.1 KB
- node_modules/@openzeppelin/contracts/access/Ownable2Step.sol1.99 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/governance/utils/IVotes.sol2.32 KB
- node_modules/@openzeppelin/contracts/interfaces/IERC4626.sol12.18 KB
- node_modules/@openzeppelin/contracts/interfaces/IERC5267.sol739 B
- node_modules/@openzeppelin/contracts/interfaces/IERC5805.sol272 B
- node_modules/@openzeppelin/contracts/interfaces/IERC6372.sol519 B
- node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol6.53 KB
- node_modules/@openzeppelin/contracts/proxy/Clones.sol4.16 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/Strings.sol3.1 KB
- node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol7.73 KB
- node_modules/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol3.76 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/math/SignedMath.sol1.26 KB
- node_modules/@openzeppelin/contracts/utils/structs/Checkpoints.sol21.14 KB
- node_modules/@openzeppelin/contracts/utils/structs/EnumerableSet.sol12.97 KB
- node_modules/@openzeppelin/contracts/utils/types/Time.sol5.1 KB
contracts/TesseractVaultDeployer.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.30;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol";
import {FusionFactoryLogicLib} from "@ipor-fusion/factory/lib/FusionFactoryLogicLib.sol";
import {IFusionFactory} from "./interfaces/IFusionFactory.sol";
import {IporFusionAccessManager} from "@ipor-fusion/managers/access/IporFusionAccessManager.sol";
import {FeeManager} from "@ipor-fusion/managers/fee/FeeManager.sol";
import {RecipientFee} from "@ipor-fusion/managers/fee/FeeManagerFactory.sol";
import {PlasmaVault} from "@ipor-fusion/vaults/PlasmaVault.sol";
import {Roles} from "@ipor-fusion/libraries/Roles.sol";
import {IWhitelisting} from "./interfaces/IWhitelisting.sol";
/// @title TesseractVaultDeployer
/// @notice Deploys pre-configured IPOR Fusion vaults for whitelisted clients
/// @dev Each deployer instance is bound to a single underlying asset.
/// Whitelisted callers invoke deployVault() and automatically receive WHITELIST_ROLE on the created vault.
contract TesseractVaultDeployer is Ownable2Step {
using SafeERC20 for IERC20;
error ZeroAddress();
error NotWhitelisted();
error InsufficientInitialDeposit();
error PermitFailed();
error ManagementFeeTooHigh();
error PerformanceFeeTooHigh();
error ManagementFeeExceedsMax(uint256 fee, uint256 maxFee);
error PerformanceFeeExceedsMax(uint256 fee, uint256 maxFee);
event VaultOwnerUpdated(address indexed newVaultOwner);
event GuardianUpdated(address indexed newGuardian);
event AtomistUpdated(address indexed newAtomist);
event AlphaUpdated(address indexed newAlpha);
event FuseManagerUpdated(address indexed newFuseManager);
event TesseractRewardsManagerUpdated(address indexed newTesseractRewardsManager);
event MinInitialDepositUpdated(uint256 newMinInitialDeposit);
event FeesUpdated(uint256 newManagementFee, uint256 newPerformanceFee);
event FeeRecipientUpdated(address indexed newFeeRecipient);
event DaoFeePackageIndexUpdated(uint256 newDaoFeePackageIndex);
event VaultDeployed(
address indexed plasmaVault,
address indexed owner,
address accessManager,
address feeManager,
address rewardsManager,
address withdrawManager,
address contextManager,
address priceManager
);
// === Constants ===
uint256 public constant MAX_MANAGEMENT_FEE = 10_00; // 10%
uint256 public constant MAX_PERFORMANCE_FEE = 50_00; // 50%
IFusionFactory public immutable FUSION_FACTORY;
IWhitelisting public immutable WHITELISTING;
address public immutable UNDERLYING_TOKEN;
uint256 public immutable REDEMPTION_DELAY_IN_SECONDS;
string public assetName;
string public assetSymbol;
// === Mutable (owner can update) ===
uint256 public daoFeePackageIndex;
address public vaultOwner;
address public guardian;
address public atomist;
address public alpha;
address public fuseManager;
address public tesseractRewardsManager;
uint256 public minInitialDeposit;
uint256 public managementFee;
uint256 public performanceFee;
address public feeRecipient;
/// @notice Initialization parameters for the deployer
struct InitParams {
address owner;
address fusionFactory;
address whitelisting;
string assetName;
string assetSymbol;
address underlyingToken;
uint256 redemptionDelayInSeconds;
uint256 daoFeePackageIndex;
address vaultOwner;
address guardian;
address atomist;
address alpha;
address fuseManager;
address tesseractRewardsManager;
uint256 minInitialDeposit;
uint256 managementFee;
uint256 performanceFee;
address feeRecipient;
}
modifier onlyWhitelisted() {
if (!WHITELISTING.isWhitelisted(msg.sender)) revert NotWhitelisted();
_;
}
constructor(InitParams memory p) Ownable(p.owner) {
if (p.fusionFactory == address(0)) revert ZeroAddress();
if (p.whitelisting == address(0)) revert ZeroAddress();
if (p.underlyingToken == address(0)) revert ZeroAddress();
if (p.vaultOwner == address(0)) revert ZeroAddress();
if (p.guardian == address(0)) revert ZeroAddress();
if (p.atomist == address(0)) revert ZeroAddress();
if (p.alpha == address(0)) revert ZeroAddress();
if (p.fuseManager == address(0)) revert ZeroAddress();
if (p.tesseractRewardsManager == address(0)) revert ZeroAddress();
if (p.feeRecipient == address(0)) revert ZeroAddress();
if (p.managementFee > MAX_MANAGEMENT_FEE) revert ManagementFeeTooHigh();
if (p.performanceFee > MAX_PERFORMANCE_FEE) revert PerformanceFeeTooHigh();
FUSION_FACTORY = IFusionFactory(p.fusionFactory);
WHITELISTING = IWhitelisting(p.whitelisting);
UNDERLYING_TOKEN = p.underlyingToken;
REDEMPTION_DELAY_IN_SECONDS = p.redemptionDelayInSeconds;
assetName = p.assetName;
assetSymbol = p.assetSymbol;
daoFeePackageIndex = p.daoFeePackageIndex;
vaultOwner = p.vaultOwner;
guardian = p.guardian;
atomist = p.atomist;
alpha = p.alpha;
fuseManager = p.fuseManager;
tesseractRewardsManager = p.tesseractRewardsManager;
minInitialDeposit = p.minInitialDeposit;
managementFee = p.managementFee;
performanceFee = p.performanceFee;
feeRecipient = p.feeRecipient;
}
// === Setters (onlyOwner) ===
function setVaultOwner(address newVaultOwner) external onlyOwner {
if (newVaultOwner == address(0)) revert ZeroAddress();
vaultOwner = newVaultOwner;
emit VaultOwnerUpdated(newVaultOwner);
}
function setGuardian(address newGuardian) external onlyOwner {
if (newGuardian == address(0)) revert ZeroAddress();
guardian = newGuardian;
emit GuardianUpdated(newGuardian);
}
function setAtomist(address newAtomist) external onlyOwner {
if (newAtomist == address(0)) revert ZeroAddress();
atomist = newAtomist;
emit AtomistUpdated(newAtomist);
}
function setAlpha(address newAlpha) external onlyOwner {
if (newAlpha == address(0)) revert ZeroAddress();
alpha = newAlpha;
emit AlphaUpdated(newAlpha);
}
function setFuseManager(address newFuseManager) external onlyOwner {
if (newFuseManager == address(0)) revert ZeroAddress();
fuseManager = newFuseManager;
emit FuseManagerUpdated(newFuseManager);
}
function setTesseractRewardsManager(address newTesseractRewardsManager) external onlyOwner {
if (newTesseractRewardsManager == address(0)) revert ZeroAddress();
tesseractRewardsManager = newTesseractRewardsManager;
emit TesseractRewardsManagerUpdated(newTesseractRewardsManager);
}
function setMinInitialDeposit(uint256 newMinInitialDeposit) external onlyOwner {
minInitialDeposit = newMinInitialDeposit;
emit MinInitialDepositUpdated(newMinInitialDeposit);
}
function setFees(uint256 newManagementFee, uint256 newPerformanceFee) external onlyOwner {
if (newManagementFee > MAX_MANAGEMENT_FEE) revert ManagementFeeTooHigh();
if (newPerformanceFee > MAX_PERFORMANCE_FEE) revert PerformanceFeeTooHigh();
managementFee = newManagementFee;
performanceFee = newPerformanceFee;
emit FeesUpdated(newManagementFee, newPerformanceFee);
}
function setFeeRecipient(address newFeeRecipient) external onlyOwner {
if (newFeeRecipient == address(0)) revert ZeroAddress();
feeRecipient = newFeeRecipient;
emit FeeRecipientUpdated(newFeeRecipient);
}
function setDaoFeePackageIndex(uint256 newDaoFeePackageIndex) external onlyOwner {
daoFeePackageIndex = newDaoFeePackageIndex;
emit DaoFeePackageIndexUpdated(newDaoFeePackageIndex);
}
// === Deploy ===
/// @notice Deploys a new vault with pre-configured parameters (requires prior ERC20 approve)
/// @param initialDeposit Amount of underlying token to deposit into the new vault
/// @param maxManagementFee Maximum acceptable management fee (reverts if current fee exceeds this)
/// @param maxPerformanceFee Maximum acceptable performance fee (reverts if current fee exceeds this)
/// @return fusionInstance The created FusionInstance with all contract addresses
function deployVault(uint256 initialDeposit, uint256 maxManagementFee, uint256 maxPerformanceFee)
external
onlyWhitelisted
returns (FusionFactoryLogicLib.FusionInstance memory fusionInstance)
{
return _deployVault(initialDeposit, maxManagementFee, maxPerformanceFee);
}
/// @notice Deploys a new vault using EIP-2612 permit for token approval
/// @param initialDeposit Amount of underlying token to deposit into the new vault
/// @param maxManagementFee Maximum acceptable management fee (reverts if current fee exceeds this)
/// @param maxPerformanceFee Maximum acceptable performance fee (reverts if current fee exceeds this)
/// @param deadline Permit signature deadline
/// @param v Permit signature v component
/// @param r Permit signature r component
/// @param s Permit signature s component
/// @return fusionInstance The created FusionInstance with all contract addresses
function deployVaultWithPermit(
uint256 initialDeposit,
uint256 maxManagementFee,
uint256 maxPerformanceFee,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external onlyWhitelisted returns (FusionFactoryLogicLib.FusionInstance memory fusionInstance) {
try IERC20Permit(UNDERLYING_TOKEN).permit(msg.sender, address(this), initialDeposit, deadline, v, r, s) {}
catch {
if (IERC20(UNDERLYING_TOKEN).allowance(msg.sender, address(this)) < initialDeposit) {
revert PermitFailed();
}
}
return _deployVault(initialDeposit, maxManagementFee, maxPerformanceFee);
}
function _deployVault(uint256 initialDeposit, uint256 maxManagementFee, uint256 maxPerformanceFee)
internal
returns (FusionFactoryLogicLib.FusionInstance memory fusionInstance)
{
if (initialDeposit < minInitialDeposit) revert InsufficientInitialDeposit();
if (managementFee > maxManagementFee) revert ManagementFeeExceedsMax(managementFee, maxManagementFee);
if (performanceFee > maxPerformanceFee) revert PerformanceFeeExceedsMax(performanceFee, maxPerformanceFee);
// Step 1: Clone vault with deployer as temporary owner
fusionInstance = FUSION_FACTORY.clone(
assetName,
assetSymbol,
UNDERLYING_TOKEN,
REDEMPTION_DELAY_IN_SECONDS,
address(this),
daoFeePackageIndex
);
IporFusionAccessManager accessManager = IporFusionAccessManager(fusionInstance.accessManager);
// Step 2: Grant OWNER-managed roles
accessManager.grantRole(Roles.GUARDIAN_ROLE, guardian, 0);
// Step 3: Grant temporary ATOMIST_ROLE to deployer
accessManager.grantRole(Roles.ATOMIST_ROLE, address(this), 0);
// Step 4: Grant ATOMIST-managed roles
accessManager.grantRole(Roles.ALPHA_ROLE, alpha, 0);
accessManager.grantRole(Roles.WHITELIST_ROLE, msg.sender, 0);
accessManager.grantRole(Roles.WHITELIST_ROLE, address(this), 0);
accessManager.grantRole(Roles.FUSE_MANAGER_ROLE, atomist, 0);
accessManager.grantRole(Roles.FUSE_MANAGER_ROLE, fuseManager, 0);
accessManager.grantRole(Roles.CONFIG_INSTANT_WITHDRAWAL_FUSES_ROLE, alpha, 0);
accessManager.grantRole(Roles.CLAIM_REWARDS_ROLE, tesseractRewardsManager, 0);
accessManager.grantRole(Roles.TRANSFER_REWARDS_ROLE, tesseractRewardsManager, 0);
accessManager.grantRole(Roles.UPDATE_REWARDS_BALANCE_ROLE, tesseractRewardsManager, 0);
// Step 5: Grant real ATOMIST_ROLE
accessManager.grantRole(Roles.ATOMIST_ROLE, atomist, 0);
// Step 6: Configure fees (skip if both are 0)
uint256 perfFee = performanceFee;
uint256 mgmtFee = managementFee;
if (perfFee > 0 || mgmtFee > 0) {
address feeManagerAddr = fusionInstance.feeManager;
RecipientFee[] memory fees = new RecipientFee[](1);
if (perfFee > 0) {
fees[0] = RecipientFee({recipient: feeRecipient, feeValue: perfFee});
FeeManager(feeManagerAddr).updatePerformanceFee(fees);
}
if (mgmtFee > 0) {
fees[0] = RecipientFee({recipient: feeRecipient, feeValue: mgmtFee});
FeeManager(feeManagerAddr).updateManagementFee(fees);
}
}
// Step 7: Emit before initial deposit so indexers see VaultDeployed first
emit VaultDeployed(
fusionInstance.plasmaVault,
msg.sender,
fusionInstance.accessManager,
fusionInstance.feeManager,
fusionInstance.rewardsManager,
fusionInstance.withdrawManager,
fusionInstance.contextManager,
fusionInstance.priceManager
);
// Step 8: Initial deposit (deployer still has roles at this point)
if (initialDeposit > 0) {
IERC20(UNDERLYING_TOKEN).safeTransferFrom(msg.sender, address(this), initialDeposit);
IERC20(UNDERLYING_TOKEN).forceApprove(fusionInstance.plasmaVault, initialDeposit);
PlasmaVault(fusionInstance.plasmaVault).deposit(initialDeposit, msg.sender);
}
// Step 9: Grant OWNER_ROLE to the configured vault owner
accessManager.grantRole(Roles.OWNER_ROLE, vaultOwner, 0);
// Step 10: Renounce all roles from deployer
accessManager.renounceRole(Roles.WHITELIST_ROLE, address(this));
accessManager.renounceRole(Roles.ATOMIST_ROLE, address(this));
accessManager.renounceRole(Roles.OWNER_ROLE, address(this));
return fusionInstance;
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"runs": 10000000,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@ipor-fusion/=lib/ipor-fusion/contracts/",
"@uniswap/v3-core/=node_modules/@uniswap/v3-core/",
"@ethereum-vault-connector/=node_modules/ethereum-vault-connector/",
"@pendle/core-v2/=node_modules/@pendle/core-v2/",
"forge-std/=lib/forge-std/src/",
"@chainlink/=node_modules/@chainlink/",
"@eth-optimism/=node_modules/@eth-optimism/",
"@morpho-org/=node_modules/@morpho-org/",
"@prb/test/=lib/ipor-fusion/lib/foundry-random/lib/prb-test/src/",
"@scroll-tech/=node_modules/@scroll-tech/",
"CramBit/=lib/ipor-fusion/lib/foundry-random/lib/CramBit/",
"base64-sol/=node_modules/base64-sol/",
"crambit/=lib/ipor-fusion/lib/foundry-random/lib/CramBit/src/",
"ds-test/=lib/ipor-fusion/lib/forge-std/lib/ds-test/src/",
"eth-gas-reporter/=lib/ipor-fusion/node_modules/eth-gas-reporter/",
"ethereum-vault-connector/=node_modules/ethereum-vault-connector/",
"foundry-random/=lib/ipor-fusion/lib/foundry-random/src/",
"ipor-fusion/=lib/ipor-fusion/contracts/",
"openzeppelin/=node_modules/ethereum-vault-connector/lib/openzeppelin-contracts/contracts/",
"prb-test/=lib/ipor-fusion/lib/foundry-random/lib/prb-test/src/",
"solidity-bytes-utils/=lib/ipor-fusion/lib/foundry-random/lib/solidity-bytes-utils/contracts/",
"@uniswap/v4-core/=lib/ipor-fusion/node_modules/@uniswap/v4-core/",
"src/=lib/ipor-fusion/lib/foundry-random/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.