Colle Marketplace
Colle.ioWebApp (Live)WebApp (Test)
  • Contracts Overview
  • Functional Requirements
  • Contract Descriptions
  • Technical Project & Audit Details
  • Test Coverage Report
  • Static Analysis
  • Royalty Pool Explained
  • Sale State Explained
  • Sales Tax Explained
  • marketplace
    • IMarketHub
    • IMarketHubRegistrar
    • MarketHub
    • MarketHubRegistrar
    • MarketHubRegistrarUpgradeable
    • collections
      • ColleCollection
      • ColleCollectionUpgradeable
      • CollectionRegistry
      • IColleCollection
      • IColleCollectionUpgradeable
      • ICollectionRegistry
    • currencies
      • BaseCurrency
      • CurrencyRegistry
      • ICurrency
      • ICurrencyRegistry
      • USDCCurrency
    • escrow
      • EscrowUpgradeable
      • IEscrow
      • IEscrowRegistry
    • kycs
      • Account
      • IKYCRegistry
      • KYCRegistry
    • markets
      • BaseMarketUpgradeable
      • IListingMarket
      • IMarket
      • IMarketRegistry
      • IOfferMarket
      • ListingMarketUpgradeable
      • MarketRegistry
      • OfferMarketUpgradeable
    • royalties
      • BaseRoyalty
      • BlackTierRoyalty
      • GoldTierRoyalty
      • GreenTierRoyalty
      • IRoyalty
      • IRoyaltyPool
      • IRoyaltyRegistry
      • PlatinumTierRoyalty
      • RoyaltyPool
      • RoyaltyRegistry
      • v1
        • BlackTierRoyaltyV1
        • GoldTierRoyaltyV1
        • GreenTierRoyaltyV1
        • PlatinumTierRoyaltyV1
    • taxes
      • ITaxPolicyRegistry
      • Tax
      • TaxPolicyRegistry
    • upgrade-gatekeeper
      • IUpgradeGatekeeper
      • UpgradeGatekeeper
    • vaults
      • IVault
      • IVaultRegistry
      • VaultUpgradeable
  • team-smart-wallet
    • ITeamSmartWallet
    • ITeamSmartWalletHelper
    • TeamSmartWallet
    • TeamSmartWalletFactory
    • TeamSmartWalletPermitHelper
  • utils
    • MarketAccess
    • MarketAccessUpgradeable
    • Signature
    • SignatureValidator
Powered by GitBook
On this page
  • erc20
  • constructor
  • Parameters
  • getERC20
  • Return Values
  • supportsInterface
  • Parameters
  • Return Values
  • getEstimatedUSDCValue
  • Parameters
  • Return Values
  1. marketplace
  2. currencies

BaseCurrency

This contract is an abstraction for any ERC20 token to convert any value to a USDC equivalency for market calculations.

erc20

contract IERC20 erc20

constructor

constructor(address _erc20) internal

Constructor sets the address for the ERC20 token.

Parameters

Name
Type
Description

_erc20

address

The address of the ERC20 token to be used as the currency.

getERC20

function getERC20() public view returns (contract IERC20)

Returns the ERC20 token that is being used as the currency.

Return Values

Name
Type
Description

[0]

contract IERC20

The ERC20 token being used as the currency.

supportsInterface

function supportsInterface(bytes4 _interfaceId) public view virtual returns (bool)

Checks if the contract implements an interface.

Parameters

Name
Type
Description

_interfaceId

bytes4

The ID of the interface.

Return Values

Name
Type
Description

[0]

bool

True if the contract implements the interface, false otherwise.

getEstimatedUSDCValue

function getEstimatedUSDCValue(uint256 _amount) public view virtual returns (uint256)

Returns the estimated value in USDC of an amount of the currency.

This function is virtual and must be implemented in child contracts.

Parameters

Name
Type
Description

_amount

uint256

The amount of currency to estimate the value of.

Return Values

Name
Type
Description

[0]

uint256

The estimated value in USDC of the specified amount of currency.

PreviouscurrenciesNextCurrencyRegistry

Last updated 2 years ago