Timeline for Geth - reading public address[] from contract
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 11, 2017 at 9:12 | vote | accept | Lee | ||
Jan 10, 2017 at 19:24 | comment | added | alper | @TjadenHess you are right, I see the problem by array perspective (created static size array as Node[100] n;) and iterate array to get the variable at each index as a separate variable. | |
Jan 10, 2017 at 19:12 | comment | added | Tjaden Hess | @Avatar That's only if you return each address as a separate variable in your return tuple. You can just return all the addresses as a single array of addresses | |
Jan 10, 2017 at 19:11 | answer | added | Tjaden Hess | timeline score: 3 | |
Jan 10, 2017 at 19:09 | comment | added | Lee |
@Avatar I defined it as address[] public MemberAddresses;
|
|
Jan 10, 2017 at 19:08 | comment | added | alper |
Yeah limitation is the answer. You can return 10 values in one call but since there is a limitation you cannot return all array elements in once call if it exceeds the limitation. But using loop won't cost you anything since all State of the contract will stored in the blockchain and if you return value via call().get() it won't cost you. How did you defined your MemberAddresses() ?
|
|
Jan 10, 2017 at 19:00 | comment | added | Lee | @Avatar Thanks, I don't understand how the first link answers my question. It talks about the "call stack process imposing a limitation." Is there something obvious I'm missing? | |
Jan 10, 2017 at 18:47 | comment | added | alper | There is a answer to your question: ethereum.stackexchange.com/a/9635/4575. You can return 15 objects in one call. And ethereum.stackexchange.com/a/9433/4575: But I assume your defined as: MemberAddresses() constant str{ } where AddressList.call. MemberAddresses() does not charge you any cost. | |
Jan 10, 2017 at 18:32 | history | edited | Lee | CC BY-SA 3.0 |
deleted 41 characters in body
|
Jan 10, 2017 at 18:21 | history | edited | Lee | CC BY-SA 3.0 |
added 93 characters in body
|
Jan 10, 2017 at 18:14 | history | asked | Lee | CC BY-SA 3.0 |