Files

42 lines
2.3 KiB
Go

// Code generated
// This file is a generated precompile contract config with stubbed abstract functions.
// The file is generated by a template. Please inspect every code and comment in this file before use.
package rewardmanager
import (
"github.com/luxfi/evm/precompile/contract"
"github.com/luxfi/geth/common"
)
const (
// FeeRecipientsAllowedEventGasCost is the gas cost of the FeeRecipientsAllowed event.
// It is calculated as the gas cost of the log operation + the gas cost of 2 topic hashes (signature + sender).
FeeRecipientsAllowedEventGasCost = contract.LogGas + contract.LogTopicGas*2
// RewardAddressChangedEventGasCost is the gas cost of the RewardAddressChanged event.
// It is calculated as the gas cost of the log operation + the gas cost of 3 topic hashes (signature + sender + oldRewardAddress).
// + the gas cost of reading old reward address.
RewardAddressChangedEventGasCost = contract.LogGas + contract.LogTopicGas*4 + contract.ReadGasCostPerSlot
// RewardsDisabledEventGasCost is the gas cost of the RewardsDisabled event.
// It is calculated as the gas cost of the log operation + the gas cost of 2 topic hashes (signature + sender).
RewardsDisabledEventGasCost = contract.LogGas + contract.LogTopicGas*2
)
// PackFeeRecipientsAllowedEvent packs the event into the appropriate arguments for FeeRecipientsAllowed.
// It returns topic hashes and the encoded non-indexed data.
func PackFeeRecipientsAllowedEvent(sender common.Address) ([]common.Hash, []byte, error) {
return RewardManagerABI.PackEvent("FeeRecipientsAllowed", sender)
}
// PackRewardAddressChangedEvent packs the event into the appropriate arguments for RewardAddressChanged.
// It returns topic hashes and the encoded non-indexed data.
func PackRewardAddressChangedEvent(sender common.Address, oldRewardAddress common.Address, newRewardAddress common.Address) ([]common.Hash, []byte, error) {
return RewardManagerABI.PackEvent("RewardAddressChanged", sender, oldRewardAddress, newRewardAddress)
}
// PackRewardsDisabledEvent packs the event into the appropriate arguments for RewardsDisabled.
// It returns topic hashes and the encoded non-indexed data.
func PackRewardsDisabledEvent(sender common.Address) ([]common.Hash, []byte, error) {
return RewardManagerABI.PackEvent("RewardsDisabled", sender)
}