IFlareDaemonize
#
Interface for contracts that receive triggers from the FlareDaemon
contract.
Functions#
daemonize
#
function daemonize(
) external returns (
bool);
Implement this function to receive a trigger from the FlareDaemon
.
The trigger method is called by the validator right at the end of block state transition.
Returns | Type | Description |
---|---|---|
[0] | bool |
bool Whether the contract is still active after the call. Currently unused. |
getContractName
#
function getContractName(
) external view returns (
string);
Implement this function to allow updating daemonized contracts through the AddressUpdater
.
Returns | Type | Description |
---|---|---|
[0] | string |
string Contract name. |
switchToFallbackMode
#
function switchToFallbackMode(
) external returns (
bool);
This function will be called after an error is caught in daemonize
.
It will switch the contract to a simpler fallback mode, which hopefully works when full mode doesn't.
Not every contract needs to support fallback mode (FtsoManager
does), so this method may be empty.
Switching back to normal mode is left to the contract (typically a governed method call).
This function may be called due to low-gas error, so it shouldn't use more than ~30.000 gas.
Returns | Type | Description |
---|---|---|
[0] | bool |
True if switched to fallback mode, false if already in fallback mode or if fallback mode is not supported. |