Module convex.core
Package convex.core

Class Coin

java.lang.Object
convex.core.Coin

public class Coin extends Object
Static Constants for Coin sizes and total supply These denominations are intended to provide more sensible human-scale units for better understanding. They have no effect on CVM behaviour.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    Copper coin, a denomination for small change/ Equal to 1000 Copper
    static final long
    Copper coin, the lowest (indivisible) denomination.
    static final int
    Number of decimals in Convex coin quantities
    static final long
    A large denomination. 1000 Gold.
    static final long
    A massively valuable amount of Convex Coins.
    static final long
    A denomination suitable for medium/large payments.
    static final long
    The maximum Convex Coin supply limit.
    static final long
    Silver Coin, a denomination for small payments.
    static final long
    A zero quantity of coins, the minimum possible
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isValidAmount(long amount)
    Check if an amount is valid quantity of Convex Coins

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • COPPER

      public static final long COPPER
      Copper coin, the lowest (indivisible) denomination.
      See Also:
    • BRONZE

      public static final long BRONZE
      Copper coin, a denomination for small change/ Equal to 1000 Copper
      See Also:
    • SILVER

      public static final long SILVER
      Silver Coin, a denomination for small payments. Equal to 1000 Bronze
      See Also:
    • GOLD

      public static final long GOLD
      A denomination suitable for medium/large payments. Equal to 1000 Silver, and divisible into one billion copper coins. Intended as the primary "human scale" quantity of Convex Coins in regular usage.
      See Also:
    • DIAMOND

      public static final long DIAMOND
      A large denomination. 1000 Gold.
      See Also:
    • EMERALD

      public static final long EMERALD
      A massively valuable amount of Convex Coins. One million Gold.
      See Also:
    • MAX_SUPPLY

      public static final long MAX_SUPPLY
      The maximum Convex Coin supply limit. One billion Gold Coins. In practice, the actual supply will be less than this.
      See Also:
    • ZERO

      public static final long ZERO
      A zero quantity of coins, the minimum possible
      See Also:
    • DECIMALS

      public static final int DECIMALS
      Number of decimals in Convex coin quantities
      See Also:
  • Constructor Details

    • Coin

      public Coin()
  • Method Details

    • isValidAmount

      public static boolean isValidAmount(long amount)
      Check if an amount is valid quantity of Convex Coins
      Parameters:
      amount - Amount to test
      Returns:
      true if valid, false otherwsie