Skip to content

TokenPool

Token pools are a FireFly construct for describing a set of tokens.

The total supply of a particular fungible token, or a group of related non-fungible tokens.

The exact definition of a token pool is dependent on the token connector implementation.

Check the documentation for your chosen connector implementation to see the detailed options for configuring a new Token Pool.

Note that it is very common to use a Token Pool to teach Hyperledger FireFly about an existing token, so that you can start interacting with a token that already exists.

Example token pool types

Some examples of how the generic concept of a Token Pool maps to various well-defined Ethereum standards:

  • ERC-1155: a single contract instance can efficiently allocate many isolated pools of fungible or non-fungible tokens
  • ERC-20 / ERC-777: each contract instance represents a single fungible pool of value, e.g. "a coin"
  • ERC-721: each contract instance represents a single pool of NFTs, each with unique identities within the pool
  • ERC-1400 / ERC-1410: partially supported in the same manner as ERC-20/ERC-777, but would require new features for working with partitions

These are provided as examples only - a custom token connector could be backed by any token technology (Ethereum or otherwise) as long as it can support the basic operations described here (create pool, mint, burn, transfer). Other FireFly repos include a sample implementation of a token connector for ERC-20 and ERC-721 as well as ERC-1155.

Example

{
    "id": "90ebefdf-4230-48a5-9d07-c59751545859",
    "type": "fungible",
    "namespace": "ns1",
    "name": "my_token",
    "standard": "ERC-20",
    "locator": "address=0x056df1c53c3c00b0e13d37543f46930b42f71db0\u0026schema=ERC20WithData\u0026type=fungible",
    "decimals": 18,
    "connector": "erc20_erc721",
    "message": "43923040-b1e5-4164-aa20-47636c7177ee",
    "active": true,
    "created": "2022-05-16T01:23:15Z",
    "info": {
        "address": "0x056df1c53c3c00b0e13d37543f46930b42f71db0",
        "name": "pool8197",
        "schema": "ERC20WithData"
    },
    "tx": {
        "type": "token_pool",
        "id": "a23ffc87-81a2-4cbc-97d6-f53d320c36cd"
    },
    "published": false
}

Field Descriptions

Field Name Description Type
id The UUID of the token pool UUID
type The type of token the pool contains, such as fungible/non-fungible FFEnum:
"fungible"
"nonfungible"
namespace The namespace for the token pool string
name The name of the token pool. Note the name is not validated against the description of the token on the blockchain string
networkName The published name of the token pool within the multiparty network string
standard The ERC standard the token pool conforms to, as reported by the token connector string
locator A unique identifier for the pool, as provided by the token connector string
key The signing key used to create the token pool. On input for token connectors that support on-chain deployment of new tokens (vs. only index existing ones) this determines the signing key used to create the token on-chain string
symbol The token symbol. If supplied on input for an existing on-chain token, this must match the on-chain information string
decimals Number of decimal places that this token has int
connector The name of the token connector, as specified in the FireFly core configuration file that is responsible for the token pool. Required on input when multiple token connectors are configured string
message The UUID of the broadcast message used to inform the network about this pool UUID
active Indicates whether the pool has been successfully activated with the token connector bool
created The creation time of the pool FFTime
config Input only field, with token connector specific configuration of the pool, such as an existing Ethereum address and block number to used to index the pool. See your chosen token connector documentation for details JSONObject
info Token connector specific information about the pool. See your chosen token connector documentation for details JSONObject
tx Reference to the FireFly transaction used to create and broadcast this pool to the network TransactionRef
interface A reference to an existing FFI, containing pre-registered type information for the token contract FFIReference
interfaceFormat The interface encoding format supported by the connector for this token pool FFEnum:
"abi"
"ffi"
methods The method definitions resolved by the token connector to be used by each token operation JSONAny
published Indicates if the token pool is published to other members of the multiparty network bool

TransactionRef

Field Name Description Type
type The type of the FireFly transaction FFEnum:
id The UUID of the FireFly transaction UUID

FFIReference

Field Name Description Type
id The UUID of the FireFly interface UUID
name The name of the FireFly interface string
version The version of the FireFly interface string