Skip to content
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

Merged
merged 5 commits into from
Jan 31, 2019
Merged

Conversation

karlb
Copy link
Contributor

@karlb karlb commented Jan 31, 2019

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.

karlb added 5 commits January 29, 2019 16:14
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.
@karlb karlb requested a review from pirapira January 31, 2019 14:46
NEW_BALANCE_PROOF_RECEIVED = 'NewBalanceProofReceived'
REWARD_CLAIMED = 'RewardClaimed'
WITHDRAWN = 'Withdrawn'
Copy link
Contributor

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));
Copy link
Contributor

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.)

Copy link
Contributor Author

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.

Copy link
Contributor

@pirapira pirapira left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants