forked from TrueCloudLab/frostfs-node
[#627] morph: Inherit internal.StaticClient interface in all wrappers
There is a need to provide contract address getter from all contract client wrappers. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
1860f5040c
commit
d6c0307431
14 changed files with 79 additions and 30 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/internal"
|
||||
)
|
||||
|
||||
// Wrapper is a wrapper over container contract
|
||||
|
@ -18,6 +19,8 @@ import (
|
|||
// expression (or just declaring a Wrapper variable) is unsafe
|
||||
// and can lead to panic.
|
||||
type Wrapper struct {
|
||||
internal.StaticClient
|
||||
|
||||
client *container.Client
|
||||
}
|
||||
|
||||
|
@ -73,5 +76,8 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
|
|||
return nil, fmt.Errorf("can't create container morph client: %w", err)
|
||||
}
|
||||
|
||||
return &Wrapper{client: enhancedContainerClient}, nil
|
||||
return &Wrapper{
|
||||
StaticClient: staticClient,
|
||||
client: enhancedContainerClient,
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue