Source Code
Latest 25 from a total of 1,450 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Claim Withdrawal... | 25505468 | 6 hrs ago | IN | 0 HYPE | 0.000082 | ||||
| Claim Withdrawal... | 25465287 | 17 hrs ago | IN | 0 HYPE | 0.00015387 | ||||
| Claim Withdrawal... | 25464398 | 17 hrs ago | IN | 0 HYPE | 0.00010812 | ||||
| Claim Withdrawal... | 25430742 | 26 hrs ago | IN | 0 HYPE | 0.00000907 | ||||
| Claim Withdrawal... | 25417877 | 30 hrs ago | IN | 0 HYPE | 0.00000907 | ||||
| Claim Withdrawal... | 25393226 | 37 hrs ago | IN | 0 HYPE | 0.00005301 | ||||
| Claim Withdrawal... | 25333683 | 2 days ago | IN | 0 HYPE | 0.00000756 | ||||
| Claim Withdrawal... | 25286643 | 2 days ago | IN | 0 HYPE | 0.00046783 | ||||
| Claim Withdrawal... | 25238104 | 3 days ago | IN | 0 HYPE | 0.00000907 | ||||
| Claim Withdrawal... | 25152756 | 4 days ago | IN | 0 HYPE | 0.00000971 | ||||
| Claim Withdrawal... | 25114497 | 4 days ago | IN | 0 HYPE | 0.00007576 | ||||
| Claim Withdrawal... | 25079187 | 5 days ago | IN | 0 HYPE | 0.00003085 | ||||
| Claim Withdrawal... | 25064644 | 5 days ago | IN | 0 HYPE | 0.0000527 | ||||
| Claim Withdrawal... | 25060704 | 5 days ago | IN | 0 HYPE | 0.0000518 | ||||
| Claim Withdrawal... | 25053300 | 5 days ago | IN | 0 HYPE | 0.00000953 | ||||
| Claim Withdrawal... | 25001834 | 6 days ago | IN | 0 HYPE | 0.00002263 | ||||
| Claim Withdrawal... | 24982434 | 6 days ago | IN | 0 HYPE | 0.00007561 | ||||
| Claim Withdrawal... | 24975187 | 6 days ago | IN | 0 HYPE | 0.00000762 | ||||
| Claim Withdrawal... | 24939667 | 6 days ago | IN | 0 HYPE | 0.00004137 | ||||
| Claim Withdrawal... | 24909381 | 7 days ago | IN | 0 HYPE | 0.0000147 | ||||
| Claim Withdrawal... | 24895558 | 7 days ago | IN | 0 HYPE | 0.00005787 | ||||
| Claim Withdrawal... | 24895062 | 7 days ago | IN | 0 HYPE | 0.00001134 | ||||
| Claim Withdrawal... | 24879776 | 7 days ago | IN | 0 HYPE | 0.0000118 | ||||
| Claim Withdrawal... | 24871547 | 7 days ago | IN | 0 HYPE | 0.00001587 | ||||
| Claim Withdrawal... | 24853801 | 7 days ago | IN | 0 HYPE | 0.00000907 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
beHYPEBatchWithdrawalClaim
Compiler Version
v0.8.29+commit.ab55807c
Optimization Enabled:
Yes with 10000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.29;
import { IWithdrawManager } from "./interfaces/IWithdrawManager.sol";
contract beHYPEBatchWithdrawalClaim {
IWithdrawManager public immutable withdrawManager;
constructor(address _withdrawManager) {
withdrawManager = IWithdrawManager(_withdrawManager);
}
function claimWithdrawalsInBatch(uint256[] memory withdrawalIds) external {
uint256 withdrawalsLength = withdrawalIds.length;
for (uint256 i = 0; i < withdrawalsLength; i++) {
withdrawManager.claimWithdrawal(withdrawalIds[i]);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import { IStakingCore } from "./IStakingCore.sol";
/**
* @title IWithdrawManager
* @notice Interface for the WithdrawalQueue contract
* @dev Defines all public and external functions for withdrawal management
*/
interface IWithdrawManager {
/* ========== STRUCTS ========== */
struct WithdrawalEntry {
address user; // Address of the user
uint256 beHypeAmount; // Amount of beHYPE tokens locked for withdrawal
uint256 hypeAmount; // Amount of HYPE to be withdrawn
bool claimed; // Whether the withdrawal has been claimed
}
/* ========== ERRORS ========== */
error WithdrawalsPaused();
error InvalidAmount();
error InsufficientBeHYPEBalance();
error NotAuthorized();
error IndexOutOfBounds();
error CanOnlyFinalizeForward();
error WithdrawalNotClaimable();
error InvalidWithdrawalID();
error TransferFailed();
error WithdrawalsNotPaused();
error InsufficientHYPELiquidity();
error InstantWithdrawalRateLimitExceeded();
error InvalidInstantWithdrawalFee();
error AlreadyClaimed();
error InsufficientMinimumAmountOut();
/* ========== EVENTS ========== */
event WithdrawalQueued(
address indexed user, uint256 indexed withdrawalId, uint256 beHypeAmount, uint256 hypeAmount, uint256 queueIndex
);
event WithdrawalsBatchFinalized(uint256 upToIndex);
event WithdrawalClaimed(address indexed user, uint256 indexed withdrawalId, uint256 hypeAmount);
event InstantWithdrawal(
address indexed user,
uint256 beHypeAmountWithdrawn,
uint256 hypeAmountReceived,
uint256 beHypeInstantWithdrawalFee
);
event InstantWithdrawalFeeInBpsUpdated(uint256 instantWithdrawalFeeInBps);
event InstantWithdrawalCapacityUpdated(uint256 capacity);
event InstantWithdrawalRefillRateUpdated(uint256 refillRate);
/* ========== MAIN FUNCTIONS ========== */
/**
* @notice Queue a withdrawal request
* @param beHYPEAmount Amount of beHYPE tokens to withdraw
* @param instant Whether to withdraw instantly for a fee or queue
* @param minAmountOut Minimum amount of HYPE to receive (protection against exchange rate changes)
* @return withdrawalId The ID of the withdrawal request
*/
function withdraw(
uint256 beHYPEAmount,
bool instant,
uint256 minAmountOut
)
external
returns (uint256 withdrawalId);
/**
* @notice Finalize withdrawals up to a specific index (protocol governor only)
* @param index Index up to which withdrawals should be finalized
*/
function finalizeWithdrawals(uint256 index) external;
function claimWithdrawal(uint256 withdrawalId) external;
/* ========== VIEW FUNCTIONS ========== */
/**
* @notice Get the count of pending (unfinalized) withdrawals
* @return uint256 Number of pending withdrawals
*/
function getPendingWithdrawalsCount() external view returns (uint256);
/**
* @notice Check if a withdrawal amount can be instant withdrawn
* @param beHYPEAmount Amount of beHYPE tokens to withdraw
* @return bool True if the withdrawal can be instant withdrawn
*/
function canInstantWithdraw(uint256 beHYPEAmount) external view returns (bool);
/**
* @notice Get a withdrawal entry from the queue
* @param index Index of the withdrawal entry
* @return WithdrawalEntry The withdrawal entry
*/
function getWithdrawalQueue(uint256 index) external view returns (WithdrawalEntry memory);
/**
* @notice Check if a withdrawal can be claimed
* @param withdrawalId The ID of the withdrawal
* @return bool True if the withdrawal can be claimed
*/
function canClaimWithdrawal(uint256 withdrawalId) external view returns (bool);
/**
* @notice Get the amount of hype requested for withdrawal
* @return uint256 The amount of hype requested for withdrawal
*/
function hypeRequestedForWithdraw() external view returns (uint256);
/* ========== ADMIN FUNCTIONS ========== */
/**
* @notice Pause withdrawals
* @dev Only callable by the role registry
*/
function pauseWithdrawals() external;
/**
* @notice Unpause withdrawals
* @dev Only callable by the role registry
*/
function unpauseWithdrawals() external;
/**
* @notice Set the instant withdrawal fee in basis points
* @param _instantWithdrawalFeeInBps The new instant withdrawal fee in basis points
* @dev Only callable by the protocol guardian
*/
function setInstantWithdrawalFeeInBps(uint16 _instantWithdrawalFeeInBps) external;
/**
* @notice Set the instant withdrawal capacity
* @param capacity The new instant withdrawal capacity
* @dev Only callable by the protocol admin
*/
function setInstantWithdrawalCapacity(uint256 capacity) external;
/**
* @notice Set the instant withdrawal refill rate per second
* @param refillRate The new instant withdrawal refill rate per second
* @dev Only callable by the protocol admin
*/
function setInstantWithdrawalRefillRatePerSecond(uint256 refillRate) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/**
* @title IStakingCore
* @notice Interface for the StakingCore contract that manages staking operations and exchange ratios
* @dev Provides functionality for staking deposits, withdrawals, token delegation, and exchange ratio management
* @author EtherFi
*/
interface IStakingCore {
/* ========== ERRORS ========== */
error NotAuthorized();
error ExchangeRatioChangeExceedsThreshold(uint16 yearlyRateInBps);
error FailedToFetchDelegatorSummary();
error AmountExceedsUint64Max();
error FailedToDepositToHyperCore();
error StakingPaused();
error ElapsedTimeCannotBeZero();
error FailedToSendFromWithdrawManager();
error WithdrawalCooldownNotMet();
error ExceedsLimit();
error PrecisionLossDetected(uint256 amount, uint256 truncatedAmount);
error ExchangeRatioUpdateTooSoon(uint256 blocksRequired, uint256 blocksPassed);
/* ========== EVENTS ========== */
/**
* @notice Emitted when the exchange ratio is updated
* @param oldRatio The previous exchange ratio
* @param newRatio The new exchange ratio
* @param yearlyRateInBps The absolute yearly rate in bps
*/
event ExchangeRatioUpdated(uint256 oldRatio, uint256 newRatio, uint16 yearlyRateInBps);
/**
* @notice Emitted when HYPE is deposited to HyperCore staking module from HyperCore spot account
* @param amount The amount of HYPE deposited
*/
event HyperCoreDeposit(uint256 amount);
/**
* @notice Emitted when HYPE is withdrawn from HyperCore staking module to HyperCore spot account
* @param amount The amount of HYPE withdrawn
*/
event HyperCoreWithdraw(uint256 amount);
/**
* @notice Emitted when HYPE is deposited to HyperCore staking module from HyperCore spot account
* @param amount The amount of HYPE deposited
*/
event HyperCoreStakingDeposit(uint256 amount);
/**
* @notice Emitted when HYPE is withdrawn from HyperCore staking module
* @param amount The amount of HYPE withdrawn
*/
event HyperCoreStakingWithdraw(uint256 amount);
/**
* @notice Emitted when HYPE is staked
* @param user Who minted the tokens
* @param amount The amount of HYPE staked
* @param communityCode The community code of the staked tokens
*/
event Deposit(address user, uint256 amount, string communityCode);
/**
* @notice Emitted when HYPE is delegated or undelegated
* @param validator The validator address
* @param amount The amount of HYPE delegated/undelegated
* @param isUndelegate True if undelegating, false if delegating
*/
event TokenDelegated(address validator, uint256 amount, bool isUndelegate);
/**
* @notice Emitted when the withdraw manager is updated
* @param withdrawManager The new withdraw manager
*/
event WithdrawManagerUpdated(address withdrawManager);
/**
* @notice Emitted when the withdrawal cooldown period is updated
* @param withdrawalCooldownPeriod The new withdrawal cooldown period in seconds
*/
event WithdrawalCooldownPeriodUpdated(uint256 withdrawalCooldownPeriod);
/**
* @notice Emitted when the acceptable APR is updated
* @param newAprInBps The new acceptable APR in basis points
*/
event AcceptableAprUpdated(uint16 newAprInBps);
/**
* @notice Emitted when the exchange rate guard is updated
* @param newExchangeRateGuard The new exchange rate guard value
*/
event ExchangeRateGuardUpdated(bool newExchangeRateGuard);
/* ========== MAIN FUNCTIONS ========== */
/**
* @notice Stakes HYPE
* @param communityCode The community code of the staked tokens
*/
function stake(string memory communityCode) external payable;
/* ========== ADMIN FUNCTIONS ========== */
/**
* @notice Updates the exchange ratio based on L1 delegator summary
* @dev Only callable by accounts with PROTOCOL_GOVERNOR role
* @dev Prevents negative rebases and enforces maximum APR change threshold
* @dev Emits ExchangeRatioUpdated event on successful update
*/
function updateExchangeRatio() external;
/**
* @notice Allows the withdraw manager to send HYPE to the user
* @param amount The amount of HYPE to send
* @param to The address to send the HYPE to
* @dev Only callable by the withdraw manager
*/
function sendFromWithdrawManager(uint256 amount, address to) external;
/**
* @notice Sets the withdraw manager
* @param _withdrawManager The new withdraw manager
* @dev Only callable by the protocol upgrader
*/
function setWithdrawManager(address _withdrawManager) external;
/**
* @notice Updates the acceptable APR
* @param _acceptablAprInBps The new acceptable APR
* @dev Only callable by the protocol guardian
*/
function updateAcceptableApr(uint16 _acceptablAprInBps) external;
/**
* @notice Updates the exchange rate guard
* @param _exchangeRateGuard The new exchange rate guard
* @dev Only callable by the protocol guardian
*/
function updateExchangeRateGuard(bool _exchangeRateGuard) external;
/**
* @notice Updates the withdrawal cooldown period
* @param _withdrawalCooldownPeriod The new cooldown period in seconds
* @dev Only callable by the protocol guardian
*/
function updateWithdrawalCooldownPeriod(uint256 _withdrawalCooldownPeriod) external;
/**
* @notice Deposits HYPE to HyperCore staking module from HyperCore spot account
* @param amount The amount of HYPE to deposit in wei
* @dev Only callable by the protocol admin
*/
function depositToHyperCore(uint256 amount) external;
/**
* @notice Withdraws HYPE from HyperCore
* @param amount The amount of HYPE to withdraw in wei
* @dev Only callable by accounts with PROTOCOL_GOVERNOR role
* @dev Sends Action 5 to CoreWriter for HyperCore processing
* @dev Emits StakingWithdraw event
* @dev Reverts if the amount is greater than the pending hype withdrawal amount
*/
function withdrawFromHyperCore(uint256 amount) external;
/**
* @notice Deposits HYPE to staking via CoreWriter Action 4
* @param amount The amount of HYPE to deposit in wei
* @dev Only callable by accounts with PROTOCOL_ADMIN role
* @dev Sends Action 4 to CoreWriter for HyperCore processing
* @dev Emits StakingDeposit event
*/
function depositToStaking(uint256 amount) external;
/**
* @notice Withdraws HYPE from staking via CoreWriter Action 5
* @param amount The amount of HYPE to withdraw in wei
* @dev Only callable by accounts with PROTOCOL_ADMIN role
* @dev Sends Action 5 to CoreWriter for HyperCore processing
* @dev Emits StakingWithdraw event
* @dev Reverts if the amount is greater than the pending hype withdrawal amount
*/
function withdrawFromStaking(uint256 amount) external;
/**
* @notice Emergency withdrawal of HYPE from staking via CoreWriter Action 5
* @param amount The amount of HYPE to withdraw in wei
* @dev Only callable by accounts with PROTOCOL_GUARDIAN role
* @dev Bypasses cooldown and pending withdrawal restrictions
* @dev Sends Action 5 to CoreWriter for HyperCore processing
* @dev Emits StakingWithdraw event
*/
function emergencyWithdrawFromStaking(uint256 amount) external;
/**
* @notice Delegates or undelegates tokens via CoreWriter Action 3
* @param validator The validator address to delegate/undelegate from
* @param amount The amount of tokens to delegate/undelegate in wei
* @param isUndelegate True if undelegating, false if delegating
* @dev Only callable by accounts with PROTOCOL_ADMIN role
* @dev Sends Action 3 to CoreWriter for HyperCore processing
* @dev Emits TokenDelegated event
*/
function delegateTokens(address validator, uint256 amount, bool isUndelegate) external;
/**
* @notice Pauses staking
* @dev Only callable by the role registry
*/
function pauseStaking() external;
/**
* @notice Unpauses staking
* @dev Only callable by the role registry
*/
function unpauseStaking() external;
/* ========== VIEW FUNCTIONS ========== */
/**
* @notice Converts beHYPE amount to HYPE using current exchange ratio
* @param beHYPEAmount The amount of beHYPE tokens to convert
* @return The equivalent amount of HYPE tokens
* @dev Uses current exchange ratio for conversion
*/
function BeHYPEToHYPE(uint256 beHYPEAmount) external view returns (uint256);
/**
* @notice Converts HYPE amount to kHYPE using current exchange ratio
* @param HYPEAmount The amount of HYPE tokens to convert
* @return The equivalent amount of kHYPE tokens
* @dev Uses current exchange ratio for conversion
*/
function HYPEToBeHYPE(uint256 HYPEAmount) external view returns (uint256);
/**
* @notice Returns the total amount of HYPE in the protocol
* @return The total amount of HYPE in the protocol
*/
function getTotalProtocolHype() external view returns (uint256);
}{
"remappings": [
"@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
"forge-std/=node_modules/forge-std/"
],
"optimizer": {
"enabled": true,
"runs": 10000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_withdrawManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256[]","name":"withdrawalIds","type":"uint256[]"}],"name":"claimWithdrawalsInBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawManager","outputs":[{"internalType":"contract IWithdrawManager","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a0604052348015600e575f5ffd5b5060405161032b38038061032b833981016040819052602b91603b565b6001600160a01b03166080526066565b5f60208284031215604a575f5ffd5b81516001600160a01b0381168114605f575f5ffd5b9392505050565b6080516102a86100835f395f81816052015260ab01526102a85ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c547495c14610038578063ec3e9da51461004d575b5f5ffd5b61004b610046366004610188565b61009d565b005b6100747f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b80515f5b81811015610156577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f84444368483815181106100f7576100f761026e565b60200260200101516040518263ffffffff1660e01b815260040161011d91815260200190565b5f604051808303815f87803b158015610134575f5ffd5b505af1158015610146573d5f5f3e3d5ffd5b5050600190920191506100a19050565b505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f60208284031215610198575f5ffd5b813567ffffffffffffffff8111156101ae575f5ffd5b8201601f810184136101be575f5ffd5b803567ffffffffffffffff8111156101d8576101d861015b565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811067ffffffffffffffff821117156102235761022361015b565b604052918252602081840181019290810187841115610240575f5ffd5b6020850194505b8385101561026357843580825260209586019590935001610247565b509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c634300081d000a0000000000000000000000009d0b0877b9f2204cf414ca7862e4f03506822538
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c547495c14610038578063ec3e9da51461004d575b5f5ffd5b61004b610046366004610188565b61009d565b005b6100747f0000000000000000000000009d0b0877b9f2204cf414ca7862e4f0350682253881565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b80515f5b81811015610156577f0000000000000000000000009d0b0877b9f2204cf414ca7862e4f0350682253873ffffffffffffffffffffffffffffffffffffffff1663f84444368483815181106100f7576100f761026e565b60200260200101516040518263ffffffff1660e01b815260040161011d91815260200190565b5f604051808303815f87803b158015610134575f5ffd5b505af1158015610146573d5f5f3e3d5ffd5b5050600190920191506100a19050565b505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f60208284031215610198575f5ffd5b813567ffffffffffffffff8111156101ae575f5ffd5b8201601f810184136101be575f5ffd5b803567ffffffffffffffff8111156101d8576101d861015b565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811067ffffffffffffffff821117156102235761022361015b565b604052918252602081840181019290810187841115610240575f5ffd5b6020850194505b8385101561026357843580825260209586019590935001610247565b509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c634300081d000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009d0b0877b9f2204cf414ca7862e4f03506822538
-----Decoded View---------------
Arg [0] : _withdrawManager (address): 0x9d0B0877b9f2204CF414Ca7862E4f03506822538
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000009d0b0877b9f2204cf414ca7862e4f03506822538
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in HYPE
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.