IResourceManager
The interface for managing the resource token and its threshold value
Functions
RESOURCE
The resource token required by parent IReleaser
function RESOURCE() external view returns (ERC20);
RESOURCE_RECIPIENT
The recipient of the RESOURCE tokens
function RESOURCE_RECIPIENT() external view returns (address);
threshold
The minimum threshold of RESOURCE tokens required to perform a release
function threshold() external view returns (uint256);
thresholdSetter
The address authorized to set the threshold value
function thresholdSetter() external view returns (address);
setThresholdSetter
Set the address authorized to set the threshold value
only callable by owner
function setThresholdSetter(address newThresholdSetter) external;
setThreshold
Set the minimum threshold of RESOURCE tokens required to perform a release
only callable by thresholdSetter
the thresholdSetter should take explicit care when updating the threshold
- lowering the threshold may create instantaneous value leakage
- front-running a release with an increased threshold may cause economic loss to the releaser/searcher
function setThreshold(uint256 newThreshold) external;
Errors
Unauthorized
Thrown when an unauthorized address attempts to call a restricted function
error Unauthorized();