How can I describe mapping method in the contract ABI? #1929
Unanswered
dzarezenko
asked this question in
Q&A
Replies: 1 comment
-
I've never tried this actually. I usually set my variables to private so it doesn't produce public getters, but this is a good question. Does the ABI for the contract not include it? Can you try just using the tuple syntax? For example, if your structure looks like this: struct Player {
address addr;
uint256 balance;
}
// Use this (notice the EXTRA parenthesis, which indicate the result is a tuple):
"function players(address) view returns ( (address, uint256) )" Let me know. :) |
Beta Was this translation helpful? Give feedback.
0 replies
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 in my contract:
Players
- is my custom structure. How should I describe this method in the contract ABI?What returns should I provide?
Beta Was this translation helpful? Give feedback.
All reactions