How to handle mapping to a struct array when nothing has been adding for an adddress? #2883
brentdunham
started this conversation in
General
Replies: 1 comment 1 reply
-
That doesn’t look like it is coming directly from ethers. Ethers doesn’t use Buffer objects internally at all. Are you using a hardhat provider or some other framework? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a mapping define like this:
mapping(address => Foo[]) public fooHolders;
If I query for an address that hasn't been added yet, I get the error "Error: missing revert data in call exception" tehn spits out the contract source followed by
Should I expose some getter from solidity instead? I really don't like the idea of just querying a mapping causing an error.
Thanks,
Brent
Beta Was this translation helpful? Give feedback.
All reactions