-
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
Basic OneToN payment implentation. #485
Conversation
Also provide an initialized UDC from the default `user_deposit_contract` fixture. Only the UDC tests need an uninitialized UDC. This might allow reusing the same UDC across multiple tests to speed up the tests. But I still have to work out the details for that to be sure.
NEW_BALANCE_PROOF_RECEIVED = 'NewBalanceProofReceived' | ||
REWARD_CLAIMED = 'RewardClaimed' | ||
WITHDRAWN = 'Withdrawn' |
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 missed these last time.
require(addressFromSignature == sender); | ||
|
||
// must not be claimed before | ||
bytes32 _key = keccak256(abi.encodePacked(receiver, sender, expiration_block)); |
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.
Why is _key
prefixed with an underscore? (Pure curiosity.)
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.
Heiko did that when sketching his idea and I thought it might be a keyword and left it that way. But looking it up, it's not one of the reserved keywords: https://solidity.readthedocs.io/en/v0.4.21/miscellaneous.html#reserved-keywords . So the "key" word is not a keyword.
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.
Looks good to me.
First implementation of the contract for PFS payments described in raiden-network/raiden-services#38. Another function to reduce gas usage by claiming multiple IOUs at once and freeing old storage slots will follow.