IInfrared
Functions
whitelistedRewardTokens
Checks if a token is a whitelisted reward token
function whitelistedRewardTokens(address _token) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
_token | address | The address of the token to check |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | bool True if the token is whitelisted, false otherwise |
vaultRegistry
Returns the infrared vault address for a given staking token
function vaultRegistry(address _asset) external view returns (IInfraredVault);
Parameters
Name | Type | Description |
---|---|---|
_asset | address | The address of the staking asset |
Returns
Name | Type | Description |
---|---|---|
<none> | IInfraredVault | IInfraredVault The vault associated with the asset |
ibgt
The InfraredBGT liquid staked token
function ibgt() external view returns (InfraredBGT);
Returns
Name | Type | Description |
---|---|---|
<none> | InfraredBGT | IInfraredBGT The InfraredBGT token contract address |
rewardsFactory
The Berachain rewards vault factory address
function rewardsFactory()
external
view
returns (IBerachainRewardsVaultFactory);
Returns
Name | Type | Description |
---|---|---|
<none> | IBerachainRewardsVaultFactory | IBerachainRewardsVaultFactory instance of the rewards factory contract address |
chef
The Berachain chef contract for distributing validator rewards
function chef() external view returns (IBeraChef);
Returns
Name | Type | Description |
---|---|---|
<none> | IBeraChef | IBeraChef instance of the BeraChef contract address |
ibgtVault
The InfraredBGT vault
function ibgtVault() external view returns (IInfraredVault);
Returns
Name | Type | Description |
---|---|---|
<none> | IInfraredVault | IInfraredVault instance of the iBGT vault contract address |
protocolFeeAmounts
The unclaimed Infrared protocol fees of token accumulated by contract
function protocolFeeAmounts(address token) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
token | address | address The token address for the accumulated fees |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 The amount of accumulated fees |
fees
Protocol fee rates to charge for various harvest function distributions
function fees(uint256 i) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
i | uint256 | The index of the fee rate |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 The fee rate |
wbera
Wrapped bera
function wbera() external view returns (IWBERA);
Returns
Name | Type | Description |
---|---|---|
<none> | IWBERA | IWBERA The wbera token contract address |
honey
Honey ERC20 token
function honey() external view returns (ERC20);
Returns
Name | Type | Description |
---|---|---|
<none> | ERC20 | ERC20 The honey token contract address |
collector
bribe collector contract
function collector() external view returns (IBribeCollector);
Returns
Name | Type | Description |
---|---|---|
<none> | IBribeCollector | IBribeCollector The bribe collector contract address |
distributor
Infrared distributor for BGT rewards to validators
function distributor() external view returns (IInfraredDistributor);
Returns
Name | Type | Description |
---|---|---|
<none> | IInfraredDistributor | IInfraredDistributor instance of the distributor contract address |
voter
IRED voter
function voter() external view returns (IVoter);
Returns
Name | Type | Description |
---|---|---|
<none> | IVoter | IVoter instance of the voter contract address |
ibera
collects all iBERA realted fees and revenue
function ibera() external view returns (IInfraredBERA);
Returns
Name | Type | Description |
---|---|---|
<none> | IInfraredBERA | returns IInfraredBERAFeeReceivor instanace of iBeraFeeReceivor |
red
The RED token
function red() external view returns (IRED);
Returns
Name | Type | Description |
---|---|---|
<none> | IRED | IRED instance of the RED token contract address |
rewardsDuration
The rewards duration
Used as gloabl variabel to set the rewards duration for all new reward tokens on InfraredVaults
function rewardsDuration() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 The reward duration period, in seconds |
registerVault
Registers a new vault for a given asset
Infrared.sol must be admin over MINTER_ROLE on InfraredBGT to grant minter role to deployed vault
Note: emits: NewVault with the caller, asset address, and new vault address.
function registerVault(address _asset)
external
returns (IInfraredVault vault);
Parameters
Name | Type | Description |
---|---|---|
_asset | address | The address of the asset, such as a specific LP token |
Returns
Name | Type | Description |
---|---|---|
vault | IInfraredVault | The address of the newly created InfraredVault contract |
addReward
Adds a new reward token to a specific staking vault
Only callable by governance when contract is initialized
Notes:
-
error: ZeroAmount if _rewardsDuration is 0
-
error: RewardTokenNotWhitelisted if _rewardsToken is not whitelisted
-
error: NoRewardsVault if vault doesn't exist for _stakingToken
function addReward(
address _stakingToken,
address _rewardsToken,
uint256 _rewardsDuration
) external;
Parameters
Name | Type | Description |
---|---|---|
_stakingToken | address | The address of the staking token associated with the vault |
_rewardsToken | address | The address of the token to be added as a reward |
_rewardsDuration | uint256 | The duration period for the rewards distribution, in seconds |
addIncentives
Adds reward incentives to a specific staking vault
Transfers reward tokens from caller to this contract, then notifies vault of new rewards
Notes:
-
error: ZeroAmount if _amount is 0
-
error: NoRewardsVault if vault doesn't exist for _stakingToken
-
error: RewardTokenNotWhitelisted if reward token hasn't been configured for the vault
-
access: Callable when contract is initialized
-
security: Requires caller to have approved this contract to spend _rewardsToken
function addIncentives(
address _stakingToken,
address _rewardsToken,
uint256 _amount
) external;
Parameters
Name | Type | Description |
---|---|---|
_stakingToken | address | The address of the staking token associated with the vault |
_rewardsToken | address | The address of the token being added as incentives |
_amount | uint256 | The amount of reward tokens to add as incentives |
updateWhiteListedRewardTokens
Updates the whitelist status of a reward token
function updateWhiteListedRewardTokens(address _token, bool _whitelisted)
external;
Parameters
Name | Type | Description |
---|---|---|
_token | address | The address of the token to whitelist or remove from whitelist |
_whitelisted | bool | A boolean indicating if the token should be whitelisted |
updateRewardsDuration
Sets the new duration for reward distributions in InfraredVaults
Only callable by governance
function updateRewardsDuration(uint256 _rewardsDuration) external;
Parameters
Name | Type | Description |
---|---|---|
_rewardsDuration | uint256 | The new reward duration period, in seconds |
updateRewardsDurationForVault
Updates the rewards duration for a specific reward token on a specific vault
Only callable by governance
function updateRewardsDurationForVault(
address _stakingToken,
address _rewardsToken,
uint256 _rewardsDuration
) external;
Parameters
Name | Type | Description |
---|---|---|
_stakingToken | address | The address of the staking asset associated with the vault |
_rewardsToken | address | The address of the reward token to update the duration for |
_rewardsDuration | uint256 | The new reward duration period, in seconds |
toggleVault
Pauses staking functionality on a specific vault
Only callable by governance, will revert if vault doesn't exist
function toggleVault(address _asset) external;
Parameters
Name | Type | Description |
---|---|---|
_asset | address | The address of the staking asset associated with the vault to pause |
claimLostRewardsOnVault
Claims lost rewards on a specific vault
Only callable by governance, will revert if vault doesn't exist
function claimLostRewardsOnVault(address _asset) external;
Parameters
Name | Type | Description |
---|---|---|
_asset | address | The address of the staking asset associated with the vault to claim lost rewards on |
recoverERC20
Recovers ERC20 tokens sent accidentally to the contract
function recoverERC20(address _to, address _token, uint256 _amount) external;
Parameters
Name | Type | Description |
---|---|---|
_to | address | The address to receive the recovered tokens |
_token | address | The address of the token to recover |
_amount | uint256 | The amount of the token to recover |
recoverERC20FromVault
Recover ERC20 tokens from a vault.
function recoverERC20FromVault(
address _asset,
address _to,
address _token,
uint256 _amount
) external;
Parameters
Name | Type | Description |
---|---|---|
_asset | address | address The address of the staking asset that the vault is for. |
_to | address | address The address to send the tokens to. |
_token | address | address The address of the token to recover. |
_amount | uint256 | uint256 The amount of the token to recover. |
delegateBGT
Delegates BGT votes to _delegatee
address.
function delegateBGT(address _delegatee) external;
Parameters
Name | Type | Description |
---|---|---|
_delegatee | address | address The address to delegate votes to |
updateInfraredBERABribesWeight
Updates the weight for iBERA bribes
function updateInfraredBERABribesWeight(uint256 _weight) external;
Parameters
Name | Type | Description |
---|---|---|
_weight | uint256 | uint256 The weight value |
updateFee
Updates the fee rate charged on different harvest functions
Please harvest all assosiated rewards for a given type before updating
Fee rate in units of 1e6 or hundredths of 1 bip
function updateFee(ConfigTypes.FeeType _t, uint256 _fee) external;
Parameters
Name | Type | Description |
---|---|---|
_t | ConfigTypes.FeeType | FeeType The fee type |
_fee | uint256 | uint256 The fee rate to update to |
setRed
Sets the address of the RED contract
Infrared must be granted MINTER_ROLE on RED to set the address
function setRed(address _red) external;
Parameters
Name | Type | Description |
---|---|---|
_red | address | The address of the RED contract |
setIBGT
Sets the address of the iBGT contract
Infrared must be granted MINTER_ROLE on IBGT to set the address
function setIBGT(address _ibgt) external;
Parameters
Name | Type | Description |
---|---|---|
_ibgt | address | The address of the iBGT contract |
updateRedMintRate
Updates the mint rate for RED
function updateRedMintRate(uint256 _redMintRate) external;
Parameters
Name | Type | Description |
---|---|---|
_redMintRate | uint256 | The new mint rate for RED |
claimProtocolFees
Claims accumulated protocol fees in contract
function claimProtocolFees(address _to, address _token, uint256 _amount)
external;
Parameters
Name | Type | Description |
---|---|---|
_to | address | address The recipient of the fees |
_token | address | address The token to claim fees in |
_amount | uint256 | uint256 The amount of accumulated fees to claim |
harvestBase
Claims all the BGT base and commission rewards minted to this contract for validators.
function harvestBase() external;
harvestOperatorRewards
Credits all accumulated rewards to the operator
function harvestOperatorRewards() external;
harvestVault
Claims all the BGT rewards for the vault associated with the given staking token.
function harvestVault(address _asset) external;
Parameters
Name | Type | Description |
---|---|---|
_asset | address | address The address of the staking asset that the vault is for. |
harvestBribes
Claims all the bribes rewards in the contract forwarded from Berachain POL.
function harvestBribes(address[] memory _tokens) external;
Parameters
Name | Type | Description |
---|---|---|
_tokens | address[] | address[] memory The addresses of the tokens to harvest in the contract. |
collectBribes
Collects bribes from bribe collector and distributes to wiBERA and iBGT Infrared vaults.
_token The payout token for the bribe collector.
_amount The amount of payout received from bribe collector.
function collectBribes(address _token, uint256 _amount) external;
harvestBoostRewards
Claims all the BGT staker rewards from boosting validators.
Sends rewards to iBGT vault.
function harvestBoostRewards() external;
addValidators
Adds validators to the set of InfraredValidators
.
function addValidators(ValidatorTypes.Validator[] memory _validators)
external;
Parameters
Name | Type | Description |
---|---|---|
_validators | ValidatorTypes.Validator[] | Validator[] memory The validators to add. |
removeValidators
Removes validators from the set of InfraredValidators
.
function removeValidators(bytes[] memory _pubkeys) external;
Parameters
Name | Type | Description |
---|---|---|
_pubkeys | bytes[] | bytes[] memory The pubkeys of the validators to remove. |
replaceValidator
Replaces a validator in the set of InfraredValidators
.
function replaceValidator(bytes calldata _current, bytes calldata _new)
external;
Parameters
Name | Type | Description |
---|---|---|
_current | bytes | bytes The pubkey of the validator to replace. |
_new | bytes | bytes The new validator pubkey. |
queueBoosts
Queue _amts
of tokens to _validators
for boosts.
function queueBoosts(bytes[] memory _pubkeys, uint128[] memory _amts)
external;
Parameters
Name | Type | Description |
---|---|---|
_pubkeys | bytes[] | bytes[] memory The pubkeys of the validators to queue boosts for. |
_amts | uint128[] | uint128[] memory The amount of BGT to boost with. |
cancelBoosts
Removes _amts
from previously queued boosts to _validators
.
_pubkeys
need not be in the current validator set in case just removed but need to cancel.
function cancelBoosts(bytes[] memory _pubkeys, uint128[] memory _amts)
external;
Parameters
Name | Type | Description |
---|---|---|
_pubkeys | bytes[] | bytes[] memory The pubkeys of the validators to remove boosts for. |
_amts | uint128[] | uint128[] memory The amounts of BGT to remove from the queued boosts. |
activateBoosts
Activates queued boosts for _pubkeys
.
function activateBoosts(bytes[] memory _pubkeys) external;
Parameters
Name | Type | Description |
---|---|---|
_pubkeys | bytes[] | bytes[] memory The pubkeys of the validators to activate boosts for. |
queueDropBoosts
Queues a drop boost of the validators removing an amount of BGT for sender.
Reverts if user
does not have enough boosted balance to cover amount.
function queueDropBoosts(bytes[] calldata pubkeys, uint128[] calldata amounts)
external;
Parameters
Name | Type | Description |
---|---|---|
pubkeys | bytes[] | bytes[] memory The pubkeys of the validators to remove boost from. |
amounts | uint128[] | Amounts of BGT to remove from the queued drop boosts. |
cancelDropBoosts
Cancels a queued drop boost of the validator removing an amount of BGT for sender.
function cancelDropBoosts(bytes[] calldata pubkeys, uint128[] calldata amounts)
external;
Parameters
Name | Type | Description |
---|---|---|
pubkeys | bytes[] | bytes[] memory The pubkeys of the validators to remove boost from. |
amounts | uint128[] | Amounts of BGT to remove from the queued drop boosts. |
dropBoosts
Drops an amount of BGT from an existing boost of validators by user.
function dropBoosts(bytes[] calldata pubkeys) external;
Parameters
Name | Type | Description |
---|---|---|
pubkeys | bytes[] | bytes[] memory The pubkeys of the validators to remove boost from. |
queueNewCuttingBoard
Queues a new cutting board on BeraChef for reward weight distribution for validator
function queueNewCuttingBoard(
bytes calldata _pubkey,
uint64 _startBlock,
IBeraChef.Weight[] calldata _weights
) external;
Parameters
Name | Type | Description |
---|---|---|
_pubkey | bytes | bytes The pubkey of the validator to queue the cutting board for |
_startBlock | uint64 | uint64 The start block for reward weightings |
_weights | IBeraChef.Weight[] | IBeraChef.Weight[] calldata The weightings used when distributor calls chef to distribute validator rewards |
infraredValidators
Gets the set of infrared validator pubkeys.
function infraredValidators()
external
view
returns (ValidatorTypes.Validator[] memory validators);
Returns
Name | Type | Description |
---|---|---|
validators | ValidatorTypes.Validator[] | Validator[] memory The set of infrared validators. |
numInfraredValidators
Gets the number of infrared validators in validator set.
function numInfraredValidators() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | num uint256 The number of infrared validators in validator set. |
isInfraredValidator
Checks if a validator is an infrared validator.
function isInfraredValidator(bytes memory _pubkey)
external
view
returns (bool);
Parameters
Name | Type | Description |
---|---|---|
_pubkey | bytes | bytes The pubkey of the validator to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | _isValidator bool Whether the validator is an infrared validator. |
getBGTBalance
Gets the BGT balance for this contract
function getBGTBalance() external view returns (uint256 bgtBalance);
Returns
Name | Type | Description |
---|---|---|
bgtBalance | uint256 | The BGT balance held by this address |
Events
NewVault
Emitted when a new vault is registered
event NewVault(address _sender, address indexed _asset, address indexed _vault);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the vault registration |
_asset | address | The address of the asset for which the vault is registered |
_vault | address | The address of the newly created vault |
VaultRegistrationPauseStatus
Emitted when pause status for new vault registration has changed
event VaultRegistrationPauseStatus(bool pause);
Parameters
Name | Type | Description |
---|---|---|
pause | bool | True if new vault creation is paused |
OperatorRewardsDistributed
Emitted when InfraredBGT tokens are supplied to distributor.
event OperatorRewardsDistributed(
address indexed _ibera, address indexed _distributor, uint256 _amt
);
Parameters
Name | Type | Description |
---|---|---|
_ibera | address | token the rewards are denominated in |
_distributor | address | The address of the distributor receiving the InfraredBGT tokens. |
_amt | uint256 | The amount of WBERA tokens supplied to distributor. |
InfraredBGTSupplied
Emitted when InfraredBGT tokens are supplied to a vault.
event InfraredBGTSupplied(
address indexed _vault, uint256 _ibgtAmt, uint256 _iredAmt
);
Parameters
Name | Type | Description |
---|---|---|
_vault | address | The address of the vault receiving the InfraredBGT and IRED tokens. |
_ibgtAmt | uint256 | The amount of InfraredBGT tokens supplied to vault. |
_iredAmt | uint256 | The amount of IRED tokens supplied to vault as additional reward from protocol. |
RewardSupplied
Emitted when rewards are supplied to a vault.
event RewardSupplied(
address indexed _vault, address indexed _token, uint256 _amt
);
Parameters
Name | Type | Description |
---|---|---|
_vault | address | The address of the vault receiving the reward. |
_token | address | The address of the token being supplied as a reward. |
_amt | uint256 | The amount of the reward token supplied. |
BribeSupplied
Emitted when rewards are supplied to a vault.
event BribeSupplied(
address indexed _recipient, address indexed _token, uint256 _amt
);
Parameters
Name | Type | Description |
---|---|---|
_recipient | address | The address receiving the bribe. |
_token | address | The address of the token being supplied as a bribe reward. |
_amt | uint256 | The amount of the bribe reward token supplied. |
Recovered
Emitted when tokens are recovered from the contract.
event Recovered(address _sender, address indexed _token, uint256 _amount);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the recovery. |
_token | address | The address of the token being recovered. |
_amount | uint256 | The amount of the token recovered. |
RewardTokenNotSupported
Emitted when a reward token is marked as unsupported.
event RewardTokenNotSupported(address _token);
Parameters
Name | Type | Description |
---|---|---|
_token | address | The address of the reward token. |
InfraredBGTUpdated
Emitted when the InfraredBGT token address is updated.
event InfraredBGTUpdated(address _sender, address _oldIbgt, address _newIbgt);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_oldIbgt | address | The previous address of the InfraredBGT token. |
_newIbgt | address | The new address of the InfraredBGT token. |
InfraredBGTVaultUpdated
Emitted when the InfraredBGT vault address is updated.
event InfraredBGTVaultUpdated(
address _sender, address _oldIbgtVault, address _newIbgtVault
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_oldIbgtVault | address | The previous address of the InfraredBGT vault. |
_newIbgtVault | address | The new address of the InfraredBGT vault. |
WhiteListedRewardTokensUpdated
Emitted when reward tokens are whitelisted or unwhitelisted.
event WhiteListedRewardTokensUpdated(
address _sender,
address indexed _token,
bool _wasWhitelisted,
bool _isWhitelisted
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_token | address | The address of the token being updated. |
_wasWhitelisted | bool | The previous whitelist status of the token. |
_isWhitelisted | bool | The new whitelist status of the token. |
RewardsDurationUpdated
Emitted when the rewards duration is updated
event RewardsDurationUpdated(
address _sender, uint256 _oldDuration, uint256 _newDuration
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update |
_oldDuration | uint256 | The previous rewards duration |
_newDuration | uint256 | The new rewards duration |
IredMintRateUpdated
Emitted when the IRED mint rate per unit InfraredBGT is updated.
event IredMintRateUpdated(
address _sender, uint256 _oldMintRate, uint256 _newMintRate
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_oldMintRate | uint256 | The previous IRED mint rate. |
_newMintRate | uint256 | The new IRED mint rate. |
InfraredBERABribesWeightUpdated
Emitted when a weight is updated.
event InfraredBERABribesWeightUpdated(
address _sender, uint256 _oldWeight, uint256 _newWeight
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_oldWeight | uint256 | The old value of the weight. |
_newWeight | uint256 | The new value of the weight. |
FeeUpdated
Emitted when protocol fee rate is updated.
event FeeUpdated(
address _sender,
ConfigTypes.FeeType _feeType,
uint256 _oldFeeRate,
uint256 _newFeeRate
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_feeType | ConfigTypes.FeeType | The fee type updated. |
_oldFeeRate | uint256 | The old protocol fee rate. |
_newFeeRate | uint256 | The new protocol fee rate. |
ProtocolFeesClaimed
Emitted when protocol fees claimed.
event ProtocolFeesClaimed(
address _sender, address _to, address _token, uint256 _amount
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the claim. |
_to | address | The address to send protocol fees to. |
_token | address | The address of the token protocol fees in. |
_amount | uint256 | The amount of protocol fees claimed. |
ProtocolFees
Emitted when protocol fees are received.
event ProtocolFees(address indexed _token, uint256 _amt, uint256 _voterAmt);
Parameters
Name | Type | Description |
---|---|---|
_token | address | The address of the token protocol fees in. |
_amt | uint256 | The amount of protocol fees received. |
_voterAmt | uint256 | The amount of protocol fees received by the voter. |
BaseHarvested
Emitted when base + commission rewards are harvested.
event BaseHarvested(address _sender, uint256 _bgtAmt);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the harvest. |
_bgtAmt | uint256 | The amount of BGT harvested. |
VaultHarvested
Emitted when a vault harvests its rewards.
event VaultHarvested(
address _sender,
address indexed _asset,
address indexed _vault,
uint256 _bgtAmt
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the harvest. |
_asset | address | The asset associated with the vault being harvested. |
_vault | address | The address of the vault being harvested. |
_bgtAmt | uint256 | The amount of BGT harvested. |
BribesCollected
Emitted when bribes are harvested then collected by collector.
event BribesCollected(
address _sender,
address _token,
uint256 _amtWiberaVault,
uint256 _amtIbgtVault
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the bribe collection. |
_token | address | The payout token from bribe collection. |
_amtWiberaVault | uint256 | The amount of collected bribe sent to the wrapped iBERA vault. |
_amtIbgtVault | uint256 | The amount of collected bribe sent to the iBGT vault. |
ValidatorHarvested
Emitted when a validator harvests its rewards.
event ValidatorHarvested(
address _sender,
bytes indexed _validator,
DataTypes.Token[] _rewards,
uint256 _bgtAmt
);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the harvest. |
_validator | bytes | The public key of the validator. |
_rewards | DataTypes.Token[] | An array of tokens and amounts harvested. |
_bgtAmt | uint256 | The amount of BGT included in the rewards. |
ValidatorsAdded
Emitted when validators are added.
event ValidatorsAdded(address _sender, ValidatorTypes.Validator[] _validators);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the addition. |
_validators | ValidatorTypes.Validator[] | An array of validators that were added. |
ValidatorsRemoved
Emitted when validators are removed from validator set.
event ValidatorsRemoved(address _sender, bytes[] _pubkeys);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the removal. |
_pubkeys | bytes[] | An array of validators' pubkeys that were removed. |
ValidatorReplaced
Emitted when a validator is replaced with a new validator.
event ValidatorReplaced(address _sender, bytes _current, bytes _new);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the replacement. |
_current | bytes | The pubkey of the current validator being replaced. |
_new | bytes | The pubkey of the new validator. |
QueuedBoosts
Emitted when BGT tokens are queued for boosts to validators.
event QueuedBoosts(address _sender, bytes[] _pubkeys, uint128[] _amts);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the boost. |
_pubkeys | bytes[] | The addresses of the validators to which tokens are queued for boosts. |
_amts | uint128[] | The amounts of tokens that were queued. |
CancelledBoosts
Emitted when existing queued boosts to validators are cancelled.
event CancelledBoosts(address _sender, bytes[] _pubkeys, uint128[] _amts);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the cancellation. |
_pubkeys | bytes[] | The pubkeys of the validators to which tokens were queued for boosts. |
_amts | uint128[] | The amounts of tokens to remove from boosts. |
ActivatedBoosts
Emitted when an existing boost to a validator is activated.
event ActivatedBoosts(address _sender, bytes[] _pubkeys);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the activation. |
_pubkeys | bytes[] | The addresses of the validators which were boosted. |
QueueDropBoosts
Emitted when an user queues a drop boost for a validator.
event QueueDropBoosts(
address indexed user, bytes[] indexed pubkeys, uint128[] amounts
);
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
pubkeys | bytes[] | The addresses of the validators to which tokens were queued for boosts. |
amounts | uint128[] | The amounts of tokens to remove from boosts. |
CancelDropBoosts
Emitted when an user cancels a queued drop boost for a validator.
event CancelDropBoosts(
address indexed user, bytes[] indexed pubkeys, uint128[] amounts
);
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the user. |
pubkeys | bytes[] | The addresses of the validators to which tokens were queued for boosts. |
amounts | uint128[] | The amounts of tokens to remove from boosts. |
DroppedBoosts
Emitted when sender removes an amount of BGT boost from a validator
event DroppedBoosts(address indexed _sender, bytes[] _pubkeys);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the cancellation. |
_pubkeys | bytes[] | The addresses of the validators to which tokens were queued for boosts. |
Undelegated
Emitted when tokens are undelegated from a validator.
event Undelegated(address _sender, bytes _pubkey, uint256 _amt);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the undelegation. |
_pubkey | bytes | The pubkey of the validator from which tokens are undelegated. |
_amt | uint256 | The amount of tokens that were undelegated. |
Redelegated
Emitted when tokens are redelegated from one validator to another.
event Redelegated(address _sender, bytes _from, bytes _to, uint256 _amt);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the redelegation. |
_from | bytes | The public key of the validator from which tokens are redelegated. |
_to | bytes | The public key of the validator to which tokens are redelegated. |
_amt | uint256 | The amount of tokens that were redelegated. |
RedSet
Emitted when the RED token is set.
event RedSet(address _sender, address _red);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_red | address | The address of the RED token. |
UpdatedRedMintRate
event UpdatedRedMintRate(
uint256 oldMintRate, uint256 newMintRate, address sender
);
Parameters
Name | Type | Description |
---|---|---|
oldMintRate | uint256 | The old mint rate for RED |
newMintRate | uint256 | The new mint rate for RED |
sender | address | The address that initiated the update |
IBGTSet
Emitted when the iBGT token is set.
event IBGTSet(address _sender, address _ibgt);
Parameters
Name | Type | Description |
---|---|---|
_sender | address | The address that initiated the update. |
_ibgt | address | The address of the iBGT token. |