livepeer / protocol

Livepeer protocol
MIT License
154 stars 45 forks source link

Staking support on behalf of another address #468

Closed kautukkundan closed 3 years ago

kautukkundan commented 3 years ago

What does this pull request do? Explain your changes. (required)

Modified bonding manager contract to extend "stake for" feature. This allows an address to stake LPT on behalf of another address.

Specific updates (required)

How did you test each of these updates (required)

Does this pull request close any open issues?

closes #453

Checklist:

kyriediculous commented 3 years ago

Cool that you opened a draft PR for this, I have some ideas that can be useful to improve the API a bit that I didn't consider before.

My current thinking is that we can remove the functions that don't accept hints and just have those that do. If hints then become the default we can just drop the withHint suffix.

Then I think it would be good to separate the two functions:

and an internal function

kautukkundan commented 3 years ago

Added some basic tests for bonding manager bond function.