-
Notifications
You must be signed in to change notification settings - Fork 38
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
ADM: Add subnet-related commands #992
ADM: Add subnet-related commands #992
Conversation
cthulhu-rider
commented
Nov 28, 2021
- Closes Add administation module for subnetworks #979
Codecov Report
@@ Coverage Diff @@
## master #992 +/- ##
==========================================
- Coverage 38.34% 37.62% -0.73%
==========================================
Files 264 265 +1
Lines 13725 14150 +425
==========================================
+ Hits 5263 5324 +61
- Misses 8024 8387 +363
- Partials 438 439 +1
Continue to review full report at Codecov.
|
9566a4a
to
7c2343d
Compare
b4704a5
to
59b48b1
Compare
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Add `subnet` command which contains all subnet-related commands. Add sub-commands: * `create` for creation; * `remove` for removal; * `get` for reading; * `admin` for admin management; * `client` for client management. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Make `nnsResolveHash` function to return declared error on `token not found` fault exception. Catch this error in `deployContracts` method, and switch to deployment if updating contract is missing. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Make `deployContracts` method to call `nnsRegisterDomain` in order to register NNS domain for deployed contracts. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Make `Client.EnableNotarySupport` method to call `NNSContractAddress` for proxy contract if it is not specified in corresponding option. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Use persistent flags on parent command in order to inherit flags in sub-commands. Turn on notary mode of morph client in `subnet` command of admin utility for notary environments. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
…ndVUB Make `CalculateNonceAndVUB` to return zero values if notary isn't enabled. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Notary event name equals to the name of the method which throws the event. Define name const of notary subnet creation. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
…ient `initSubnetClient` must call `EnableNotarySupport` only if non-notary flag is not set. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Cobra commands don't call `PreRun` functions on parent by default. We need to do it in `subnet` command of admin utility in order to inherit viper bindings. Add `inheritPreRun` function which makes sub-commands to call `PreRun` functions before its own `PreRun`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement `ManageNodes` operation on morph subnet client. Add `node add` and `node remove` commands to `subnet` section. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Only `subnet create` command can generate notary requests. Remove global `non-notary` flag. Add `notary` flag to `create` cmd. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
32690bf
to
686a613
Compare
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
f9fcbd0
to
0d52753
Compare
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>