Describes an entity with the ability to query token information related to Erdstall and its onchain contracts.

Hierarchy

  • TokenFetcher

Implements

Constructors

Properties

bigbang?: number
holderCache: TokenHolders
typeCache: TokenTypes

Methods

  • Finds the address of the first registered token contract in Erdstall, which has the given symbol as its symbol according to the ERC20Detailed specification.

    Returns

    The address when a token contract matching the symbol could be found, otherwise undefined.

    Remarks

    ERC20Detailed

    Parameters

    • erdstall: Erdstall

      The Erdstall contract.

    • symbol: string

      The symbol to search for.

    • Optional fromBlock: number

      When omitted the starting block from when the Erdstall contract was deployed will be used.

    Returns Promise<undefined | Address>

  • Parameters

    Returns Promise<undefined | "ETH" | "ERC20" | "ERC721" | "ERC721Mintable">

  • Parameters

    • signer: Signer
    • ttype: "ETH" | "ERC20" | "ERC721" | "ERC721Mintable"
    • token: string | Address

    Returns Responder

  • Sets the locally cached token type for the given token address.

    Parameters

    • tokenAddr: string

      The address of the token to update.

    • ttype: "ETH" | "ERC20" | "ERC721" | "ERC721Mintable"

      The token type.

    Returns void

  • Retrieves the address of the token holder contract for the given token type related to the given Erdstall contract.

    Throws

    An error when no token holder contract is registered for the given token type.

    Returns

    The address of the holder contract in string representation.

    Parameters

    • erdstall: Erdstall

      The Erdstall contract.

    • ttype: "ETH" | "ERC20" | "ERC721" | "ERC721Mintable"

      The token type which is handled by some holder contract.

    Returns Promise<string>

  • Retrieves the token type for a given token address related to the given Erdstall contract.

    Throws

    An error when the given token address is not registered with the Erdstall contract.

    Returns

    The token type of the given token address.

    Parameters

    • erdstall: Erdstall

      The Erdstall contract.

    • tokenAddr: string

      The address of a token contract.

    Returns Promise<"ETH" | "ERC20" | "ERC721" | "ERC721Mintable">

Generated using TypeDoc