Module
Network.Ethereum.Web3.Types.TokenUnit
- Package
- purescript-web3
- Repository
- f-o-a-m/purescript-web3
#TokenUnit Source
class TokenUnit a where
Useful for converting to and from the base denomination
Members
fromMinorUnit :: BigNumber -> a
toMinorUnit :: a -> BigNumber
Instances
(TokenUnitSpec a) => TokenUnit (Value a)
#TokenUnitSpec Source
#Value Source
newtype Value (a :: TokenUnit)
A value of some token in specific denomination
Instances
Eq (Value a)
Show (Value a)
Decode (Value a)
Encode (Value a)
Encode (Value (NoPay t))
(TokenUnitSpec a) => Semigroup (Value a)
(TokenUnitSpec a) => Monoid (Value a)
(TokenUnitSpec a) => LeftModule (Value a) Int
(TokenUnitSpec a) => TokenUnit (Value a)
#formatValue Source
formatValue :: forall a. TokenUnitSpec a => Value a -> String
#mkValue Source
mkValue :: forall a. TokenUnitSpec a => BigNumber -> Value a
Convert a big number into value, first using floor
function to take the integer part
- Modules
- Network.
Ethereum. Web3 - Network.
Ethereum. Web3. Api - Network.
Ethereum. Web3. Contract - Network.
Ethereum. Web3. Contract. Internal - Network.
Ethereum. Web3. JsonRPC - Network.
Ethereum. Web3. Solidity - Network.
Ethereum. Web3. Solidity. AbiEncoding - Network.
Ethereum. Web3. Solidity. Bytes - Network.
Ethereum. Web3. Solidity. EncodingType - Network.
Ethereum. Web3. Solidity. Event - Network.
Ethereum. Web3. Solidity. Generic - Network.
Ethereum. Web3. Solidity. Int - Network.
Ethereum. Web3. Solidity. Size - Network.
Ethereum. Web3. Solidity. Sizes - Network.
Ethereum. Web3. Solidity. Tuple - Network.
Ethereum. Web3. Solidity. UInt - Network.
Ethereum. Web3. Solidity. Vector - Network.
Ethereum. Web3. Types - Network.
Ethereum. Web3. Types. EtherUnit - Network.
Ethereum. Web3. Types. Provider - Network.
Ethereum. Web3. Types. TokenUnit - Network.
Ethereum. Web3. Types. Types