Skip to content
This repository was archived by the owner on Mar 16, 2023. It is now read-only.
This repository was archived by the owner on Mar 16, 2023. It is now read-only.

ZkAsset not properly reporting information on linked token #516

@TomAFrench

Description

@TomAFrench

Expected Behaviour

The token property of a ZkAsset should accurately report information on the linked token, e.g. name, symbol, decimals.

Current Behaviour

All linked tokens are reported to have a value of "0" for decimals and an empty string for name (symbol isn't included).

I'm trying to display a ZkAsset's balance in terms of its equivalent value in public tokens so I need to know the value of decimals. Currently this requires me to independently spin up a ERC20 contract instance to call these methods which, while definitely doable, isn't ideal.

Possible Solution

On instantiation of a ZkAsset with a linked token, these properties should be automatically queried and stored.

Steps to Reproduce (for bugs)

  1. Instantiate a ZkAsset
  2. Print out token property

Context

Your Environment

  • AZTEC packages and their versions: v1.10.1 of sdk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions