Skip to content

IBlockRewardController

0x696C296D320beF7b3148420bf2Ff4a378c0a209B | ABI JSON

Functions

baseRate

Returns the constant base rate for BGT.

solidity
function baseRate() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The constant base amount of BGT to be minted in the current block.

rewardRate

Returns the reward rate for BGT.

solidity
function rewardRate() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The unscaled amount of BGT to be minted in the current block.

minBoostedRewardRate

Returns the minimum boosted reward rate for BGT.

solidity
function minBoostedRewardRate() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The minimum amount of BGT to be minted in the current block.

processRewards

processes the rewards for the specified block and mints the BGT to the distributor and commissions to coinbase.

This function can only be called by the distributor.

solidity
function processRewards(address coinbase, uint256 blockNumber) external returns (uint256);

Parameters

NameTypeDescription
coinbaseaddressThe validator's coinbase address for the block.
blockNumberuint256The block number to process rewards for.

Returns

NameTypeDescription
<none>uint256the amount of BGT minted to distributor.

setBaseRate

Sets the constant base reward rate for BGT.

This function can only be called by the owner, which is the governance address.

solidity
function setBaseRate(uint256 _baseRate) external;

Parameters

NameTypeDescription
_baseRateuint256The new base rate.

setRewardRate

Sets the reward rate for BGT.

This function can only be called by the owner, which is the governance address.

solidity
function setRewardRate(uint256 _rewardRate) external;

Parameters

NameTypeDescription
_rewardRateuint256The new reward rate.

setMinBoostedRewardRate

Sets the min boosted reward rate for BGT.

This function can only be called by the owner, which is the governance address.

solidity
function setMinBoostedRewardRate(uint256 _minBoostedRewardRate) external;

Parameters

NameTypeDescription
_minBoostedRewardRateuint256The new min boosted reward rate.

setDistributor

Sets the distributor contract that receives the minted BGT.

This function can only be called by the owner, which is the governance address.

solidity
function setDistributor(address _distributor) external;

Parameters

NameTypeDescription
_distributoraddressThe new distributor contract.

Events

BaseRateChanged

Emitted when the constant base rate has changed.

solidity
event BaseRateChanged(uint256 oldBaseRate, uint256 newBaseRate);

Parameters

NameTypeDescription
oldBaseRateuint256The old base rate.
newBaseRateuint256The new base rate.

RewardRateChanged

Emitted when the reward rate has changed.

solidity
event RewardRateChanged(uint256 oldRewardRate, uint256 newRewardRate);

Parameters

NameTypeDescription
oldRewardRateuint256The old reward rate.
newRewardRateuint256The new reward rate.

MinBoostedRewardRateChanged

Emitted when the min boosted reward rate has changed.

solidity
event MinBoostedRewardRateChanged(uint256 oldMinBoostedRewardRate, uint256 newMinBoostedRewardRate);

Parameters

NameTypeDescription
oldMinBoostedRewardRateuint256The old min boosted reward rate.
newMinBoostedRewardRateuint256The new min boosted reward rate.

SetDistributor

Emitted when the distributor is set.

solidity
event SetDistributor(address indexed rewardDistribution);

BlockRewardProcessed

Emitted when the rewards for the specified block have been processed.

solidity
event BlockRewardProcessed(uint256 blockNumber, uint256 baseRate, uint256 commissionRate, uint256 rewardRate);

Parameters

NameTypeDescription
blockNumberuint256The block number that was processed.
baseRateuint256The base amount of BGT minted to either the coinbase or the coinbase operator.
commissionRateuint256The commission amount of BGT minted to either the coinbase or the coinbase operator.
rewardRateuint256The amount of BGT minted to the distributor.