[#1515] adm: Print address in base58 format in morph ape get-admin
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m45s
Pre-commit hooks / Pre-commit (push) Successful in 2m39s
Vulncheck / Vulncheck (push) Successful in 2m30s
Tests and linters / gopls check (push) Successful in 3m6s
Build / Build Components (push) Successful in 3m27s
Tests and linters / Staticcheck (push) Successful in 3m50s
Tests and linters / Lint (push) Successful in 4m43s
Tests and linters / Tests (push) Successful in 4m50s
Tests and linters / Tests with -race (push) Successful in 6m9s
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m45s
Pre-commit hooks / Pre-commit (push) Successful in 2m39s
Vulncheck / Vulncheck (push) Successful in 2m30s
Tests and linters / gopls check (push) Successful in 3m6s
Build / Build Components (push) Successful in 3m27s
Tests and linters / Staticcheck (push) Successful in 3m50s
Tests and linters / Lint (push) Successful in 4m43s
Tests and linters / Tests (push) Successful in 4m50s
Tests and linters / Tests with -race (push) Successful in 6m9s
Signed-off-by: George Bartolomey <george@bh4.ru>
This commit is contained in:
parent
3ebd560f42
commit
0e5524dac7
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ import (
|
||||||
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
|
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
|
||||||
apeCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common/ape"
|
apeCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common/ape"
|
||||||
apechain "git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain"
|
apechain "git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -200,7 +200,7 @@ func listRuleChains(cmd *cobra.Command, _ []string) {
|
||||||
|
|
||||||
func setAdmin(cmd *cobra.Command, _ []string) {
|
func setAdmin(cmd *cobra.Command, _ []string) {
|
||||||
s, _ := cmd.Flags().GetString(addrAdminFlag)
|
s, _ := cmd.Flags().GetString(addrAdminFlag)
|
||||||
addr, err := util.Uint160DecodeStringLE(s)
|
addr, err := address.StringToUint160(s)
|
||||||
commonCmd.ExitOnErr(cmd, "can't decode admin addr: %w", err)
|
commonCmd.ExitOnErr(cmd, "can't decode admin addr: %w", err)
|
||||||
pci, ac := newPolicyContractInterface(cmd)
|
pci, ac := newPolicyContractInterface(cmd)
|
||||||
h, vub, err := pci.SetAdmin(addr)
|
h, vub, err := pci.SetAdmin(addr)
|
||||||
|
@ -214,7 +214,7 @@ func getAdmin(cmd *cobra.Command, _ []string) {
|
||||||
pci, _ := newPolicyContractReaderInterface(cmd)
|
pci, _ := newPolicyContractReaderInterface(cmd)
|
||||||
addr, err := pci.GetAdmin()
|
addr, err := pci.GetAdmin()
|
||||||
commonCmd.ExitOnErr(cmd, "unable to get admin: %w", err)
|
commonCmd.ExitOnErr(cmd, "unable to get admin: %w", err)
|
||||||
cmd.Println(addr.StringLE())
|
cmd.Println(address.Uint160ToString(addr))
|
||||||
}
|
}
|
||||||
|
|
||||||
func listTargets(cmd *cobra.Command, _ []string) {
|
func listTargets(cmd *cobra.Command, _ []string) {
|
||||||
|
|
Loading…
Reference in a new issue