Skip to content
Verified contractPartialBUSL-1.1

PlasmaVaultBase

Address0x80f451017066494de93943c36ce453fb98ae0b29
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.30

 

Same code

2 more contracts

 

Details

Compiler
solc 0.8.30+commit.73712a01
Language
solidity
Optimization
Yes, 200 runs
EVM version
cancun
License
BUSL-1.1
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,255,248
Creation transaction
0xd6f9fd4c91…cfcc4bd924
Main copy (most transactions)
0x233074f6…a1a18c7b

79 files

The source code is large: one file is shown at a time. Choose a file in the list.

lib/ipor-fusion/contracts/interfaces/IRewardsClaimManager.sol

// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.30;

import {FuseAction} from "../interfaces/IPlasmaVault.sol";

/// @notice Vesting data struct
/// @custom:storage-location erc7201:io.ipor.managers.rewards.VestingData
struct VestingData {
    /// @notice vestingTime The time when the vesting is pending
    uint32 vestingTime;
    /// @notice updateBalanceTimestamp The timestamp of the last balance update
    uint32 updateBalanceTimestamp;
    /// @notice transferredTokens The number of tokens that have been transferred from RewardsClaimManager to the Plasma Vault
    uint128 transferredTokens;
    /// @notice lastUpdateBalance The balance of the last update
    uint128 lastUpdateBalance;
}

/// @title Rewards Claim Manager interface
interface IRewardsClaimManager {
    /// @notice Retrieves the balance of linear vested underlying tokens owned by RewardsClaimManager.sol contract
    /// @return balance The balance of the vesting data in uint256.
    /// @dev This method calculates the current balance based on the vesting schedule.
    /// If the `updateBalanceTimestamp` is zero, it returns zero. Otherwise, it calculates
    /// the ratio of the elapsed time to the total vesting time to determine the proportion
    /// of the balance that is currently available. The balance is adjusted by the number
    /// of tokens that have already been transferred. Thr result is in underlying token decimals.
    function balanceOf() external view returns (uint256);

    /// @notice Checks if the specified reward fuse is supported.
    /// @param fuse_ The address of the fuse to be checked.
    /// @return supported A boolean value indicating whether the reward fuse is supported.
    /// @dev This method checks the internal configuration to determine if the provided fuse address
    /// is supported for reward management.
    function isRewardFuseSupported(address fuse_) external view returns (bool);

    /// @notice Retrieves the vesting data.
    /// @return vestingData A struct containing the vesting data.
    /// @dev This method returns the current state of the vesting data, including details such as
    /// the last update balance, the transferred tokens, and the timestamp of the last update.
    function getVestingData() external view returns (VestingData memory);

    /// @notice Transfers a specified amount of an asset to a given address.
    /// @param asset_ The address of the asset to be transferred.
    /// @param to_ The address of the recipient.
    /// @param amount_ The amount of the asset to be transferred, represented in the asset's decimals.
    /// @dev This method facilitates the transfer of a specified amount of the given asset from the contract to the recipient's address.
    function transfer(address asset_, address to_, uint256 amount_) external;

    /// @notice Adds multiple reward fuses.
    /// @param fuses_ An array of addresses representing the fuses to be added.
    /// @dev This method adds the provided list of fuse addresses to the contract's configuration.
    /// It allows the inclusion of multiple fuses in a single transaction for reward management purposes.
    function addRewardFuses(address[] calldata fuses_) external;

    /// @notice Removes a specified reward fuse.
    /// @param fuses_ The addresses of the fuse to be removed.
    /// @dev This method removes the provided fuse address from the contract's configuration.
    /// It is used to manage and update the list of supported reward fuses.
    function removeRewardFuses(address[] calldata fuses_) external;

    /// @notice Claims rewards based on the provided fuse actions.
    /// @param calls_ An array of FuseAction structs representing the actions for claiming rewards.
    /// @dev This method processes the provided fuse actions to claim the corresponding rewards.
    /// Each FuseAction in the array is executed to facilitate the reward claim process.
    function claimRewards(FuseAction[] calldata calls_) external;

    /// @notice Sets up the vesting schedule with a specified delay for token release.
    /// @param releaseTokensDelay_ The delay in seconds before the tokens are released.
    /// @dev This method configures the vesting schedule by setting the delay time for token release.
    /// The delay defines the period that must pass before the tokens can be released to the beneficiary.
    /// @dev Setting this to zero will stop vesting and freeze underlying token on the contract.
    /// @dev When called mid-flight (transferredTokens > 0 and lastUpdateBalance > 0), reverts with
    /// UnsafeVestingTime when the requested duration would force balanceOf() into the clamp window
    /// where vested_now < transferredTokens.
    function setupVestingTime(uint256 releaseTokensDelay_) external;

    /// @notice Rebase the vesting schedule in place without transferring tokens to the Plasma Vault.
    /// @param newVestingTime_ New vesting duration in seconds. Must be > 0.
    /// @param newUpdateBalanceTimestamp_ New anchor timestamp for the linear curve. Must be <= block.timestamp.
    /// @dev Reverts with UnsafeReschedule when the new tuple would force balanceOf() to clamp at
    /// block.timestamp. Useful when governance changes the vesting length but totalAssets() must
    /// stay continuous at this block.
    function rescheduleVesting(uint32 newVestingTime_, uint32 newUpdateBalanceTimestamp_) external;

    /// @notice Updates the balance based on the current vesting schedule and transferred tokens.
    /// @dev This method recalculates the balance considering the elapsed time, vesting schedule,
    /// and the number of tokens that have already been transferred. It updates the internal
    /// state to reflect the latest balance.
    function updateBalance() external;

    /// @notice Transfers vested underlying tokens to the Plasma Vault.
    /// @dev This method transfers the underlying tokens that have vested according to the vesting schedule
    /// to the designated Plasma Vault. It ensures that only the vested portion of the underlying tokens
    /// is transferred.
    function transferVestedTokensToVault() external;

    /// @notice Retrieves the list of reward fuses.
    /// @return An array of addresses representing the reward fuses.
    function getRewardsFuses() external view returns (address[] memory);
}
Compiler settingsShow
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": [
    "@openzeppelin/=lib/ipor-fusion/node_modules/@openzeppelin/",
    "@chainlink/=lib/ipor-fusion/node_modules/@chainlink/",
    "@uniswap/v4-core/=lib/ipor-fusion/node_modules/@uniswap/v4-core/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@ipor-protocol-deploy/=contracts/",
    "@ipor-fusion/=lib/ipor-fusion/",
    "@ipor-protocol/=lib/ipor-protocol/",
    "scripts/=scripts/",
    "@eth-optimism/=lib/ipor-fusion/node_modules/@eth-optimism/",
    "@ethereum-vault-connector/=lib/ipor-fusion/node_modules/ethereum-vault-connector/",
    "@morpho-org/=lib/ipor-fusion/node_modules/@morpho-org/",
    "@pendle/=lib/ipor-fusion/node_modules/@pendle/",
    "@prb/test/=lib/ipor-fusion/lib/foundry-random/lib/prb-test/src/",
    "@scroll-tech/=lib/ipor-fusion/node_modules/@scroll-tech/",
    "@uniswap/v3-core/=lib/ipor-fusion/node_modules/@uniswap/v3-core/",
    "CramBit/=lib/ipor-fusion/lib/foundry-random/lib/CramBit/",
    "abdk-libraries-solidity/=node_modules/abdk-libraries-solidity/",
    "base64-sol/=lib/ipor-fusion/node_modules/base64-sol/",
    "crambit/=lib/ipor-fusion/lib/foundry-random/lib/CramBit/src/",
    "erc4626-tests/=lib/ipor-fusion/node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "ethereum-vault-connector/=lib/ipor-fusion/node_modules/ethereum-vault-connector/",
    "foundry-random/=lib/ipor-fusion/lib/foundry-random/src/",
    "hardhat-deploy/=node_modules/hardhat-deploy/",
    "hardhat/=node_modules/hardhat/",
    "ipor-fusion/=lib/ipor-fusion/contracts/",
    "openzeppelin-contracts/=lib/ipor-fusion/node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/",
    "openzeppelin/=lib/ipor-fusion/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/",
    "solmate/=lib/ipor-fusion/node_modules/@uniswap/v4-core/lib/solmate/",
    "src/=lib/ipor-fusion/lib/foundry-random/src/",
    "test/=lib/ipor-fusion/test/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.