Skip to main content

CurrencyManager

LooksRare protocol team (👀,💎)

CurrencyManager

This contract manages the list of valid fungible currencies.

Methods​

cancelOwnershipTransfer​

function cancelOwnershipTransfer() external nonpayable

This function is used to cancel the ownership transfer.

This function can be used for both cancelling a transfer to a new owner and cancelling the renouncement of the ownership.

confirmOwnershipRenouncement​

function confirmOwnershipRenouncement() external nonpayable

This function is used to confirm the ownership renouncement.

confirmOwnershipTransfer​

function confirmOwnershipTransfer() external nonpayable

This function is used to confirm the ownership transfer.

This function can only be called by the current potential owner.

initiateOwnershipRenouncement​

function initiateOwnershipRenouncement() external nonpayable

This function is used to initiate the ownership renouncement.

initiateOwnershipTransfer​

function initiateOwnershipTransfer(address newPotentialOwner) external nonpayable

This function is used to initiate the transfer of ownership to a new owner.

Parameters​

NameTypeDescription
newPotentialOwneraddressNew potential owner address

isCurrencyAllowed​

function isCurrencyAllowed(address) external view returns (bool)

It checks whether the currency is allowed for transacting.

Parameters​

NameTypeDescription
_0addressundefined

Returns​

NameTypeDescription
_0boolundefined

owner​

function owner() external view returns (address)

Address of the current owner.

Returns​

NameTypeDescription
_0addressundefined

ownershipStatus​

function ownershipStatus() external view returns (enum IOwnableTwoSteps.Status)

Ownership status.

Returns​

NameTypeDescription
_0enum IOwnableTwoSteps.Statusundefined

potentialOwner​

function potentialOwner() external view returns (address)

Address of the potential owner.

Returns​

NameTypeDescription
_0addressundefined

updateCurrencyStatus​

function updateCurrencyStatus(address currency, bool isAllowed) external nonpayable

This function allows the owner to update the status of a currency.

Only callable by owner.

Parameters​

NameTypeDescription
currencyaddressCurrency address (address(0) for ETH)
isAllowedboolWhether the currency should be allowed for trading

Events​

CancelOwnershipTransfer​

event CancelOwnershipTransfer()

This is emitted if the ownership transfer is cancelled.

CurrencyStatusUpdated​

event CurrencyStatusUpdated(address currency, bool isAllowed)

It is emitted if the currency status in the allowlist is updated.

Parameters​

NameTypeDescription
currencyaddressundefined
isAllowedboolundefined

InitiateOwnershipRenouncement​

event InitiateOwnershipRenouncement()

This is emitted if the ownership renouncement is initiated.

InitiateOwnershipTransfer​

event InitiateOwnershipTransfer(address previousOwner, address potentialOwner)

This is emitted if the ownership transfer is initiated.

Parameters​

NameTypeDescription
previousOwneraddressundefined
potentialOwneraddressundefined

NewOwner​

event NewOwner(address newOwner)

This is emitted when there is a new owner.

Parameters​

NameTypeDescription
newOwneraddressundefined

Errors​

NoOngoingTransferInProgress​

error NoOngoingTransferInProgress()

This is returned when there is no transfer of ownership in progress.

NotOwner​

error NotOwner()

This is returned when the caller is not the owner.

RenouncementNotInProgress​

error RenouncementNotInProgress()

This is returned when there is no renouncement in progress but the owner tries to validate the ownership renouncement.

TransferAlreadyInProgress​

error TransferAlreadyInProgress()

This is returned when the transfer is already in progress but the owner tries initiate a new ownership transfer.

TransferNotInProgress​

error TransferNotInProgress()

This is returned when there is no ownership transfer in progress but the ownership change tries to be approved.

WrongPotentialOwner​

error WrongPotentialOwner()

This is returned when the ownership transfer is attempted to be validated by the a caller that is not the potential owner.