Auto-detect HW accounts in TransactingPower. Finalize basic staking via contract CLI functionality.#1402
Conversation
Codecov Report
@@ Coverage Diff @@
## biznaga #1402 +/- ##
===========================================
- Coverage 83.17% 83.15% -0.02%
===========================================
Files 72 72
Lines 10709 10836 +127
===========================================
+ Hits 8907 9011 +104
- Misses 1802 1825 +23
Continue to review full report at Codecov.
|
|
looks like it's passing :-) why else do you you anticipate including? |
9b0bd65 to
89fe1be
Compare
ad641eb to
146fb9d
Compare
| @click.option('--lock-until', help="Period to release re-staking lock", type=click.IntRange(min=0)) | ||
| @click.option('--beneficiary-address', help="Address of a pre-allocation beneficiary", type=EIP55_CHECKSUM_ADDRESS) | ||
| @click.option('--allocation-filepath', help="Path to individual allocation file", type=EXISTING_READABLE_FILE) | ||
| @click.option('--all', help="List all stakes, including inactive", is_flag=True) |
There was a problem hiding this comment.
--all sounds like a too general word for this option. Maybe --show-inactive, or --with-inactive?
There was a problem hiding this comment.
I agree, although @szotov told me something today about how these stakes are not really "inactive", so perhaps we have to rethink this option altogether.
There was a problem hiding this comment.
Yeah, this needs a rename. Does this have an issue open?
| ``--allocation-filepath /path/to/allocation_registry.json``. | ||
| As an alternative to the ``--allocation-filepath`` flag, preallocation users | ||
| can directly specify their beneficiary and staking contract addresses with the | ||
| ``--beneficiary-address ADDRESS`` and ``--staking-address ADDRESS``, respectively. |
There was a problem hiding this comment.
So, staking address is address of the contract which will stake for this beneficiary?
...phew, much better!
* Remove --escrow flag * No account selection; use individual allocation file or explicit addresses
21fa779 to
c157a51
Compare
| return r | ||
|
|
||
| def __eq__(self, other) -> bool: | ||
| # TODO: Is this right? Two stakes from different accounts, durations, etc, but of the same value, are equal? |
| self.start_datetime = datetime_at_period(period=first_locked_period, | ||
| seconds_per_period=self.economics.seconds_per_period) | ||
| seconds_per_period=self.economics.seconds_per_period, | ||
| start_of_period=True) |
There was a problem hiding this comment.
This is a bit confusing for a boolean flag. Would it be better as is_start_of_period?
| @click.option('--lock-until', help="Period to release re-staking lock", type=click.IntRange(min=0)) | ||
| @click.option('--beneficiary-address', help="Address of a pre-allocation beneficiary", type=EIP55_CHECKSUM_ADDRESS) | ||
| @click.option('--allocation-filepath', help="Path to individual allocation file", type=EXISTING_READABLE_FILE) | ||
| @click.option('--all', help="List all stakes, including inactive", is_flag=True) |
There was a problem hiding this comment.
Yeah, this needs a rename. Does this have an issue open?
michwill
left a comment
There was a problem hiding this comment.
Approving, but we need to address the situation with timedeltas elsewhere (I understand, you didn't want to include that in the scope of this PR)
TransactingPowernow auto-detects that the account comes from a HW, using the data provided by geth endpointpersonal_listWallets. Fix Potential incorrect initialization of TransactingPowers in StakeHolder #1385. Fix Reliable and thin device auto-detection for Transacting Power and CLI. #1128nucypher stake collect-rewardnucypher stake.nucypher stake listnow only prints active stakes. Fixes Past stakes shouldn't be printed as "Active" withnucypher stake list#1418