Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Endogen opened this issue Feb 28, 2022 · 0 comments
Open

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

Endogen opened this issue Feb 28, 2022 · 0 comments

Comments

@Endogen
Copy link

Endogen commented Feb 28, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant