IWarperManager
IWarperManager
AccountIsNotAuthorizedWizardForWarperManagement
error AccountIsNotAuthorizedWizardForWarperManagement(address account)
Thrown when the `account` is not a Wizard authorized for Warper Management.
Name |
Type |
Description |
account |
address |
The account that was checked. |
AccountIsNotAuthorizedOperatorForWarperManagement
error AccountIsNotAuthorizedOperatorForWarperManagement(address warper, address account)
Thrown when the `account` is not an Operator authorized for Warper Management.
Name |
Type |
Description |
warper |
address |
The Warper's address. |
account |
address |
The account that was checked. |
AccountIsNotWarperAdmin
error AccountIsNotWarperAdmin(address warper, address account)
Thrown when the `account` is not a Warper admin for `warper`.
Name |
Type |
Description |
warper |
address |
The Warper. |
account |
address |
The account that was checked. |
WarperRegistrationParams
struct WarperRegistrationParams {
string name;
uint256 universeId;
bool paused;
}
WarperRegistered
event WarperRegistered(uint256 universeId, address warper, address original, bytes4 assetClass)
Emitted when a new warper is registered.
Name |
Type |
Description |
universeId |
uint256 |
Universe ID. |
warper |
address |
Warper address. |
original |
address |
Original asset address. |
assetClass |
bytes4 |
Asset class ID (identical for the `original` and `warper`). |
WarperDeregistered
event WarperDeregistered(address warper)
Emitted when the warper is no longer registered.
Name |
Type |
Description |
warper |
address |
Warper address. |
WarperPaused
event WarperPaused(address warper)
Emitted when the warper is paused.
Name |
Type |
Description |
warper |
address |
Address. |
WarperUnpaused
event WarperUnpaused(address warper)
Emitted when the warper pause is lifted.
Name |
Type |
Description |
warper |
address |
Address. |
registerWarper
function registerWarper(address warper, struct IWarperManager.WarperRegistrationParams params) external
Registers a new warper.
The warper must be deployed and configured prior to registration,
since it becomes available for renting immediately.
Name |
Type |
Description |
warper |
address |
Warper address. |
params |
struct IWarperManager.WarperRegistrationParams |
Warper registration params. |
deregisterWarper
function deregisterWarper(address warper) external
Deletes warper registration information.
All current rental agreements with the warper will stay intact, but the new rentals won't be possible.
Name |
Type |
Description |
warper |
address |
Warper address. |
pauseWarper
function pauseWarper(address warper) external
Puts the warper on pause.
Emits a {WarperPaused} event.
Name |
Type |
Description |
warper |
address |
Address. |
unpauseWarper
function unpauseWarper(address warper) external
Lifts the warper pause.
Emits a {WarperUnpaused} event.
Name |
Type |
Description |
warper |
address |
Address. |
setWarperController
function setWarperController(address[] warpers, address controller) external
Sets the new controller address for one or multiple registered warpers.
Name |
Type |
Description |
warpers |
address[] |
A list of registered warper addresses which controller will be changed. |
controller |
address |
Warper controller address. |
checkWarperAdmin
function checkWarperAdmin(address warper, address account) external view
Reverts if the warpers universe owner is not the provided account address.
Name |
Type |
Description |
warper |
address |
Warpers address. |
account |
address |
The address that's expected to be the warpers universe owner. |
checkRegisteredWarper
function checkRegisteredWarper(address warper) external view
Reverts if warper is not registered.
checkUniverseHasWarper
function checkUniverseHasWarper(uint256 universeId) external view
Reverts if no warpers are registered for the universe.
checkUniverseHasWarperForAsset
function checkUniverseHasWarperForAsset(uint256 universeId, address asset) external view
Reverts if no warpers are registered for asset in the certain universe.
checkIsAuthorizedWizardForWarperManagement
function checkIsAuthorizedWizardForWarperManagement(address account) external view
Reverts if the provided `account` is not a Wizard authorized for Warper Management.
Name |
Type |
Description |
account |
address |
The account to check for. |
universeWarperCount
function universeWarperCount(uint256 universeId) external view returns (uint256)
Returns the number of warpers belonging to the particular universe.
Name |
Type |
Description |
universeId |
uint256 |
The universe ID. |
Name |
Type |
Description |
[0] |
uint256 |
Warper count. |
universeWarpers
function universeWarpers(uint256 universeId, uint256 offset, uint256 limit) external view returns (address[], struct Warpers.Warper[])
Returns the list of warpers belonging to the particular universe.
Name |
Type |
Description |
universeId |
uint256 |
The universe ID. |
offset |
uint256 |
Starting index. |
limit |
uint256 |
Max number of items. |
Name |
Type |
Description |
[0] |
address[] |
List of warper addresses. |
[1] |
struct Warpers.Warper[] |
List of warpers. |
universeAssetWarpers
function universeAssetWarpers(uint256 universeId, address asset, uint256 offset, uint256 limit) external view returns (address[], struct Warpers.Warper[])
Returns the list of warpers belonging to the particular asset in universe.
Name |
Type |
Description |
universeId |
uint256 |
The universe ID. |
asset |
address |
Original asset. |
offset |
uint256 |
Starting index. |
limit |
uint256 |
Max number of items. |
Name |
Type |
Description |
[0] |
address[] |
List of warper addresses. |
[1] |
struct Warpers.Warper[] |
List of warpers. |
universeAssetWarperCount
function universeAssetWarperCount(uint256 universeId, address asset) external view returns (uint256)
Returns the number of warpers registered for certain asset in universe.
Name |
Type |
Description |
universeId |
uint256 |
Universe ID. |
asset |
address |
Original asset address. |
Name |
Type |
Description |
[0] |
uint256 |
Warper count. |
function metahub() external view returns (address)
Returns the Metahub address.
isWarperAdmin
function isWarperAdmin(address warper, address account) external view returns (bool)
Checks whether `account` is the `warper` admin.
Name |
Type |
Description |
warper |
address |
Warper address. |
account |
address |
Account address. |
Name |
Type |
Description |
[0] |
bool |
True if the `account` is the admin of the `warper` and false otherwise. |
warperInfo
function warperInfo(address warper) external view returns (struct Warpers.Warper)
Returns registered warper details.
Name |
Type |
Description |
warper |
address |
Warper address. |
Name |
Type |
Description |
[0] |
struct Warpers.Warper |
Warper details. |
warperController
function warperController(address warper) external view returns (address)
Returns warper controller address.
Name |
Type |
Description |
warper |
address |
Warper address. |
Name |
Type |
Description |
[0] |
address |
Current controller. |