Skip to content

ForeignHash does not consider 'default_value' of original Hash #300

@Endogen

Description

@Endogen

Describe the bug
Defining a ForeignHash in a contract doesn't take in account the default_value of the original Hash.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new contract and define a ForeignHash. For example:
tau_balances = ForeignHash(foreign_contract='currency', foreign_name='balances')
  1. Retrieve a value that does NOT exist:
some_value = tau_balances["this does not exist"]

Expected behavior
Variable some_value should be 0 since the original Hash was defined with default_value=0 but it's None

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