Skip to main content

BaseFeeOracle

Interprets the base fee from our base fee provider contract to determine if a harvest is permissable.

Version 0.1.0

Functions

constructor

  function constructor(
) public

Use this if our network hasn't implemented the base fee method yet

isCurrentBaseFeeAcceptable

  function isCurrentBaseFeeAcceptable(
) public returns (bool)

Returns whether we should allow harvests based on current base fee.

setMaxAcceptableBaseFee

  function setMaxAcceptableBaseFee(
uint256 _maxAcceptableBaseFee
) external

Set the maximum base fee we want for our keepers to accept. Gwei is 1e9.

Throws if the caller is not authorized or gov.

Parameters:

NameTypeDescription
_maxAcceptableBaseFeeuint256The acceptable maximum price to pay in wei.

setManualBaseFeeBool

  function setManualBaseFeeBool(
bool _manualBaseFeeBool
) external

If we don't have a provider, then manually determine if true or not. Useful in testing as well.

Throws if the caller is not authorized or gov.

Parameters:

NameTypeDescription
_manualBaseFeeBoolboolBoolean to allow/block harvests if we don't
have a provider set up.

setAuthorized

  function setAuthorized(
address _target,
bool _value
) external

Controls whether a non-gov address can adjust certain params.

Throws if the caller is not current governance.

Parameters:

NameTypeDescription
_targetaddressThe address to add/remove authorization for.
_valueboolBoolean to grant or revoke access.

setPendingGovernance

  function setPendingGovernance(
address _governance
) external

Starts the 1st phase of the governance transfer.

Throws if the caller is not current governance.

Parameters:

NameTypeDescription
_governanceaddressThe next governance address

acceptGovernance

  function acceptGovernance(
) external

Completes the 2nd phase of the governance transfer.

Throws if the caller is not the pending caller. Emits a NewGovernance event.

setBaseFeeProvider

  function setBaseFeeProvider(
address _baseFeeProvider
) external

Sets the address used to pull the current network base fee.

Throws if the caller is not current governance.

Parameters:

NameTypeDescription
_baseFeeProvideraddressThe network's baseFeeProvider address

_onlyAuthorized

  function _onlyAuthorized(
) internal

_onlyGovernance

  function _onlyGovernance(
) internal

Events

NewGovernance

  event NewGovernance(
)

NewProvider

  event NewProvider(
)

UpdatedMaxBaseFee

  event UpdatedMaxBaseFee(
)

UpdatedManualBaseFee

  event UpdatedManualBaseFee(
)

UpdatedAuthorization

  event UpdatedAuthorization(
)