SwapRetirementHolder
Inherits: KeeperCompatibleInterface, Ownable
State Variables
interval
Use an interval in seconds and a timestamp to slow execution of Upkeep
uint256 public interval;
lastTimeStamp
uint256 public lastTimeStamp;
numPendingRetirementAddresses
uint256 public numPendingRetirementAddresses;
continueUpKeeping
bool private continueUpKeeping;
WrappedNativeAssetAddress
address public WrappedNativeAssetAddress;
sourceCarbonToken
address public sourceCarbonToken;
KlimaAggregator
IKlimaRetirementAggregator public KlimaAggregator;
pendingRetirementAmounts
mapping(address => uint256) public pendingRetirementAmounts;
pendingRetirees
mapping(uint256 => address) public pendingRetirees;
pendingAddressQueuePosition
mapping(address => uint256) public pendingAddressQueuePosition;
Functions
constructor
constructor(address _KlimaAggregator, uint256 _interval, address _wrappedNativeAsset, address _carbonToken);
setKlimaAggregator
function setKlimaAggregator(address newAggregator) public onlyManager;
setRetirementInterval
function setRetirementInterval(uint256 newInterval) public onlyManager;
setSourceCarbonToken
function setSourceCarbonToken(address newCarbonToken) public onlyManager;
checkUpkeep
function checkUpkeep(bytes calldata) external view override returns (bool upkeepNeeded, bytes memory);
performUpkeep
function performUpkeep(bytes calldata) external override;
storePendingRetirement
function storePendingRetirement(uint256 amountToStore, address addressToStore) public onlyManager;
replaceAddressInPendingRetirement
function replaceAddressInPendingRetirement(address oldAddress, address replacementAddress) public onlyManager;
receive
receive() external payable;
fallback
fallback() external payable;
Events
intervalUpdated
event intervalUpdated(uint256 newInterval);
aggregatorAddressUpdated
event aggregatorAddressUpdated(address newAddress);
newPendingRetirement
event newPendingRetirement(address retiree, uint256 amount);
newCarbonTokenUpdated
event newCarbonTokenUpdated(address newCarbonTokenUpdate);