StakingManager
StakingManager__IsNotApprovedAgent
StakingManager__AgentIsNotActive
StakingManager__RewardsAlreadyClaimed
StakingManager__InvalidAmount
StakingManager__InvalidFeeRate
StakingManager__InvalidRoundCondition
StakingManager__NoWithdrawRequested
StakingManager__WithdrawingPended
StakingManager__InvalidInputLength
ADMIN
ROUND_MANAGER
STAKE_MANAGER
Delegate
Withdraw
RewardClaimed
AgentRewardClaimed
UpdateFee
DepositPersonalStake
RequestWithdrawPersonalStake
WithdrawPersonalStake
Slashed
Reward
Delegator
AgentInfo
isInit
setContracts init marker
agentManager
ngl
globalConfig
round
Current round number
rewardCollectors
reward collector addresses for delegators
agentInfo
agent info structs
initialize
Initialize
Parameters
initAddr
address[1]
isApprovedAgent
onlyApprovedAgent
setContracts
Set contracts addresses
Parameters
initAddr
address[5]
_authorizeUpgrade
_claimRewards
This methods should also be called before each delegator action (stake/unstake) to keep track of only recent rewards
Parameters
_agent
address
- agent address
setRewardCollector
Set reward collector address for delegator
Parameters
agent
address
rewardCollector
address
- reward collector address
getRewardCollector
Get reward collector for delegator
Parameters
delegator
address
- delegator address
agent
address
delegate
Delegate NGL to agent
Parameters
_agent
address
- agent address
_amount
uint256
- amount of NGL to delegate
withdraw
Withdraw delegation
Parameters
_agent
address
- agent address
_amount
uint256
- amount of NGL to withdraw
claimRewards
Claim delegator rewards from last claim round to current round
Parameters
_agent
address
- agent address
distributeRewards
Distribute rewards at the turn of a round
Parameters
agents
address[]
- agents addresses
amounts
uint256[]
- reward amounts
turnRound
Execute turning of a round
lockAgentStake
Lock agent stake for bet
Parameters
_agent
address
- agent address
_amount
uint256
- amount of NGL to lock
unlockAgentStake
Unlock agent stake when bet is released
Parameters
_agent
address
- agent address
_amount
uint256
- amount of NGL to unlock
slash
Slash agent personal stake
Parameters
_agent
address
- agent address
_amount
uint256
- amount of NGL to slash
claimAgentRewards
Claim agent rewards from last claim round to current round
updateFee
Update agent fee (reflected only on next round)
Parameters
newFee
uint256
- new fee
depositPersonalStake
Deposit to personal stake of agent
Parameters
_amount
uint256
- amount of NGL to deposit
requestWithdrawPersonalStake
Request withdrawal from personal stake of agent (available to withdraw on next round)
Parameters
_amount
uint256
- amount of NGL to withdraw
withdrawPersonalStake
Withdraw personal stake (requested on previous rounds)
getAgentActiveDelegation
Get actual total delegation (recorded at the start of round)
Parameters
_agent
address
- agent address
getAgentRealtimeDelegation
Get current total delegation (reflected on the next round)
Parameters
_agent
address
- agent address
getAgentPersonalStake
Get personal stake of agent
Parameters
_agent
address
- agent address
Last updated