[#687] neofs-adm: transfer funds to consensus wallets
This is the first stage requiring running blockchain. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
6f07710693
commit
425c1db5c0
3 changed files with 293 additions and 0 deletions
21
cmd/neofs-adm/internal/modules/morph/n3client.go
Normal file
21
cmd/neofs-adm/internal/modules/morph/n3client.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package morph
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func getN3Client(v *viper.Viper) (*client.Client, error) {
|
||||
ctx := context.Background() // FIXME(@fyrchik): timeout context
|
||||
endpoint := v.GetString(endpointFlag)
|
||||
c, err := client.New(ctx, endpoint, client.Options{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := c.Init(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return c, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue