Hord ETH Staking Manager (HETH)
Core contract for Ethereum Staking Platform.
Code
HordETHStakingManager.sol
Address
HordETHStakingManager is deployed at 0x5bBe36152d3CD3eB7183A82470b39b29EedF068B on the Ethereum mainnet.
Overview
HordETHStakingManager(HETH) is upgradeable contract where users can deposit ETH in order to stake and earn validator rewards, redeeming of deposit is not possible yet, but it will be after the Shanghai Hard Fork.
Events
Deposit
event Deposit(address account, uint256 amountDeposited);Emitted each time when someone deposits.
LaunchNewValidator
event LaunchNewValidator(address account, uint256 amountWithdrawn);Emitted each time when a new validator is launched.
HETHMinted
Emitted each time when new HETH tokens are minted.
EtherReceived
Emitted each time when contract receives the execution layer rewards.
FeeCollected
Emitted each time when reward fees are collected.
StakingStatsUpdated
Emitted each time when the staking stats are updated.
NewTokensFarmSDKSet
Emitted each time when the
TokensFarmSDKaddress changes.
Transfer
Emitted each time when the someone transfers
HETHtokens.
Approval
Emitted each time when the someone approves
HETHtokens.
Burn
Emitted each time when HordETHStakingManager calls burn function.
Mint
Emitted each time when HordETHStakingManager calls mint function.
Core functions
userDepositETH
UserDepositETHfunction allowing user to deposit ETH on contract.Emits
Depositevent.
launchNewValidator
LaunchNewValidatorWithdraws funds for launching new validator, callable only by maintainer.Emits
LaunchNewValidatorevent.
transfer
Transfer HETH from msg.sender to
recipientaddress.Emits
Transferevent.
approve
Msg.sender approves
spenderto manage his HETH tokens.Emits
Approvalevent.
transferFrom
Transfer this
amountof HETH fromsendertorecipientaddress.Emits
Transferevent.
Read-Only functions
totalETHDeposited
TotalETHDepositedrepresents total ETH deposited by user.
totalBalanceETHInValidators
TotalBalanceETHInValidatorsrepresents total balance ETH in validators includes amount required to launch the validator plus validator rewards.
totalRewardsCollected
TotalRewardsCollectedrepresents total rewards collected validator plus execution layer rewards.
totalHETHMinted
TotalHETHMintedrepresents total HETH minted.
numberOfUsers
NumberOfUsersrepresents total number of users who stake.
lastRewardsForFeeCalc
LastRewardsForFeeCalcrepresents the last amount of total rewards from which fees was taken.
totalFeesAccountedInETH
TotalFeesAccountedInETHrepresents total fees accounted in ETH.
totalFeesMintedInHETH
TotalFeesMintedInHETHrepresents total fees minted in HETH.
lastExecLayerRewardsForFeeCalc
LastExecLayerRewardsForFeeCalcrepresents the last amount of execution layer rewards from which fees was taken.
totalExecLayerRewards
TotalExecLayerRewardsrepresents total total amount of execution layer rewards.
hordCongressMembersRegistry
HordCongressMembersRegistryrepresents instance of HordCongressMembersRegistry contract.
beaconDeposit
BeaconDepositrepresents instance of BeaconDeposit contract.
stakingConfiguration
StakingConfigurationrepresents instance of StakingConfiguration contract.
users
Usersmap user address to his informations.
getAmountOfHETHforETH
GetAmountOfHETHforETHcalculates how much HETH will be minted for certain amount of ETH.
decimals
decimalsreturns the number of decimals used to get its user representation.
totalSupply
totalSupllyreturns total supply of HETH token.
balanceOf
balanceOfbalance of HETH tokens for sepcificaccount.
allowance
allowancereturns amount of HETH whichownerhas approvedspenderto use.
name
namereturns name of HETH token.
symbol
symbolreturns symbol of HETH token.
State-Changing Functions
pause
Pausefunction allowing HordCongress or maintainer to pause contract.Emits
Pausedevent.
unpause
Unpausefunction allowing HordCongress member to unpause contract.Emits
Unpausedevent.
setTokensfarmSDK
SetTokensFarmSDKsets address of TokensFarmSDK contract.Emits a
NewTokensFarmSDKSetecent.
setValidatorStats
SetValidatorStatssets total amount of collected rewards, total balance ETH in validators and total amount of execution layer rewards.Emits a
StakingStatsUpdatedevent.
Last updated