Skip to content

FixedRateWithRewardListingController

FixedRateWithRewardListingController

FixedRateWithRewardListingControllerInitParams

struct FixedRateWithRewardListingControllerInitParams {
  contract IACL acl;
  contract IMetahub metahub;
}

constructor

constructor() public

initialize

function initialize(struct FixedRateWithRewardListingController.FixedRateWithRewardListingControllerInitParams params) external

Contract initializer.

Name Type Description
params struct FixedRateWithRewardListingController.FixedRateWithRewardListingControllerInitParams Init params.

calculateRentalFee

function calculateRentalFee(struct IListingTermsRegistry.Params listingTermsParams, struct IListingTermsRegistry.ListingTerms listingTerms, struct Rentings.Params rentingParams) external view returns (uint256 totalFee, uint256 listerBaseFee, uint256 universeBaseFee, uint256 protocolBaseFee, struct ITaxTermsRegistry.TaxTerms universeTaxTerms, struct ITaxTermsRegistry.TaxTerms protocolTaxTerms)

Calculates rental fee based on listing terms, tax terms and renting params.

Name Type Description
listingTermsParams struct IListingTermsRegistry.Params Listing terms params.
listingTerms struct IListingTermsRegistry.ListingTerms Listing terms.
rentingParams struct Rentings.Params Renting params.
Name Type Description
totalFee uint256 Rental fee (base tokens per second including taxes).
listerBaseFee uint256 Lister fee (base tokens per second without taxes).
universeBaseFee uint256 Universe fee.
protocolBaseFee uint256 Protocol fee.
universeTaxTerms struct ITaxTermsRegistry.TaxTerms Universe tax terms.
protocolTaxTerms struct ITaxTermsRegistry.TaxTerms Protocol tax terms.

decodeStrategyParams

function decodeStrategyParams(struct IListingTermsRegistry.ListingTerms terms) external pure returns (uint256 baseRate, uint16 rewardPercentage)

Decodes listing terms data.

Name Type Description
terms struct IListingTermsRegistry.ListingTerms Encoded listing terms.
Name Type Description
baseRate uint256 Asset renting base rate (base tokens per second).
rewardPercentage uint16 Asset renting base reward percentage rate.

contractKey

function contractKey() external pure returns (bytes4)

Returns implemented contract key.

Name Type Description
[0] bytes4 Contract key;

supportsInterface

function supportsInterface(bytes4 interfaceId) public view returns (bool)

_Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created.

This function call must use less than 30 000 gas._

strategyId

function strategyId() public pure returns (bytes4)

Returns implemented strategy ID.

Name Type Description
[0] bytes4 Listing strategy ID.

_authorizeUpgrade

function _authorizeUpgrade(address newImplementation) internal

_Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by {upgradeTo} and {upgradeToAndCall}.

Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.

```solidity function authorizeUpgrade(address) internal override onlyOwner {} ```

_acl

function _acl() internal view returns (contract IACL)

return the IACL address