Closed kautukkundan closed 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:
bond(uint256 _amount, address _orchestrator, ... hints)
which calls the internal function and supplies msg.sender
as _for
argumentbondFor(uint256 _amount, address _orchestrator, address _for, ... hints)
which calls the internal function with the same arguments as provided in the external calland an internal function
bond(uint256 _amount, address _orchestrator, address _for, ... hints)
Added some basic tests for bonding manager bond function.
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)
bondWithHint
function to acceptonBehalfOf
addressbond
function to passmsg.sender
asonBehalfOf
bondOnBehalf
How did you test each of these updates (required)
Does this pull request close any open issues?
closes #453
Checklist:
npm run test
pass