-
Notifications
You must be signed in to change notification settings - Fork 45
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
List addresses that have ever made deposits #1140
Conversation
all registered services can be somehow discovered.
Codecov Report
@@ Coverage Diff @@
## master #1140 +/- ##
=======================================
Coverage 81.18% 81.18%
=======================================
Files 21 21
Lines 1446 1446
Branches 188 188
=======================================
Hits 1174 1174
Misses 230 230
Partials 42 42 Continue to review full report at Codecov.
|
require(now < service_valid_till[msg.sender], "registration expired"); | ||
require(bytes(new_url).length != 0, "new url is empty string"); | ||
urls[msg.sender] = new_url; | ||
return true; | ||
} | ||
|
||
/// A getter function for seeing the length of ever_made_deposits array. | ||
function ever_made_deposits_len() public view returns (uint256 _len) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really weird that solidity does not provide this for public arrays itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It's weird.
When I was integrating
raiden-contrtacts 0.26.0
with the Raiden client, I realized that there must be a way for the client to look up all registered services in ServiceRegistry contract. This PR provides a poor man's solution to this problem, namely, a list of all addresses that have ever made a deposit. The client can then query about any address in the list.This closes #1139.