Closed nkuba closed 1 year ago
Thanks for the review @pdyraga. I consider the work for this PR completed. It's ready for the next round.
To summarize, there are three code changes I'd like to see in this PR:
Everything else is tracked in separate issues.
@pdyraga its' ready.
The changes here are a step on the road to the fully automated sweeps (https://github.com/keep-network/keep-core/issues/3614).
We update the
propose-deposits-sweep
command initially implemented in https://github.com/keep-network/keep-core/pull/3549.The main change to the command is that if deposits are not provided as arguments, they will be automatically fetched from the chain.
The command will find the oldest unswept deposits for the oldest unswept wallet and construct a sweep proposal for them.
Number of deposits for the proposal is based on the
depositSweepMaxSize
defined in theWalletCoordinator
contract. The value can be overwritten with--deposit-sweep-max-size <number>
.If
--wallet <wallet-public-key-hash>
is provided the command will find unswept deposits for the particular wallet.If
--fee <number>
is not provided the command will estimate a fee for the sweep transaction.Sample Command
To execute the command in dry-run mode: