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
Name | Type | Description |
---|---|---|
initAddr | address[1] |
isApprovedAgent
onlyApprovedAgent
setContracts
Set contracts addresses
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
setRewardCollector
Set reward collector address for delegator
Parameters
Name | Type | Description |
---|---|---|
agent | address | |
rewardCollector | address | - reward collector address |
getRewardCollector
Get reward collector for delegator
Parameters
Name | Type | Description |
---|---|---|
delegator | address | - delegator address |
agent | address |
delegate
Delegate NGL to agent
Parameters
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
_amount | uint256 | - amount of NGL to delegate |
withdraw
Withdraw delegation
Parameters
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
_amount | uint256 | - amount of NGL to withdraw |
claimRewards
Claim delegator rewards from last claim round to current round
Parameters
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
distributeRewards
Distribute rewards at the turn of a round
Parameters
Name | Type | Description |
---|---|---|
agents | address[] | - agents addresses |
amounts | uint256[] | - reward amounts |
turnRound
Execute turning of a round
lockAgentStake
Lock agent stake for bet
Parameters
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
_amount | uint256 | - amount of NGL to lock |
unlockAgentStake
Unlock agent stake when bet is released
Parameters
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
_amount | uint256 | - amount of NGL to unlock |
slash
Slash agent personal stake
Parameters
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
newFee | uint256 | - new fee |
depositPersonalStake
Deposit to personal stake of agent
Parameters
Name | Type | Description |
---|---|---|
_amount | uint256 | - amount of NGL to deposit |
requestWithdrawPersonalStake
Request withdrawal from personal stake of agent (available to withdraw on next round)
Parameters
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
getAgentRealtimeDelegation
Get current total delegation (reflected on the next round)
Parameters
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
getAgentPersonalStake
Get personal stake of agent
Parameters
Name | Type | Description |
---|---|---|
_agent | address | - agent address |
Last updated